1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Update pkg_add's remote package feature to reflect the new structure of

wcarchive. This needs to be updated when:

(a) The directory structure changes on wcarchive
(b) getosreldate() has a new significance
	(ie. get ELF packages/get a.out packages)
(c) Branches are changed around

As we stand right now, 3.0-postELFday and 4.0-x all point to the same
directory, but when 4.0 starts to have its own packages, this file will
need to be changed.
This commit is contained in:
Bill Fumerola 1999-01-25 21:08:13 +00:00
parent 04fb1490a0
commit c6a6c9c017
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43204

View File

@ -1,6 +1,6 @@
#ifndef lint
static const char rcsid[] =
"$Id: main.c,v 1.19 1999/01/17 01:22:54 billf Exp $";
"$Id: main.c,v 1.20 1999/01/18 03:54:17 billf Exp $";
#endif
/*
@ -63,7 +63,7 @@ main(int argc, char **argv)
char *remotepkg = NULL, *ptr;
static char binformat[1024];
static char packageroot[MAXPATHLEN] = "ftp://ftp.FreeBSD.org/pub/FreeBSD/";
static char packageroot[MAXPATHLEN] = "ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/";
start = argv;
while ((ch = getopt(argc, argv, Options)) != -1) {
@ -191,12 +191,12 @@ getpackagesite(char binform[1024])
reldate = getosreldate();
if (reldate == 300005)
return "packages-3.0/Latest/";
return "i386/packages-3.0/";
else if (30004 > reldate && reldate >= 300000)
return "packages-current-aout/Latest/" ;
return "i386/packages-3.0-aout/Latest/" ;
else if (30004 < reldate)
return !strcmp(binform, "elf") ? "packages-current/Latest/" :
"packages-current-aout/Latest";
return !strcmp(binform, "elf") ? "i386/packages-3-stable/Latest/" :
"i386/packages-3.0-aout/Latest/";
return(0);