diff options
author | billf <billf@FreeBSD.org> | 1999-01-25 21:08:13 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-01-25 21:08:13 +0000 |
commit | 06f295fcffb9814ae716634e8bc18ce1bb09111d (patch) | |
tree | 6c677a5ad6cd6e78aa15869153471b74aef5bed8 /usr.sbin | |
parent | a0771b15e7dbf40b838afc7a3e44ad9ea570c392 (diff) | |
download | FreeBSD-src-06f295fcffb9814ae716634e8bc18ce1bb09111d.zip FreeBSD-src-06f295fcffb9814ae716634e8bc18ce1bb09111d.tar.gz |
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.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/add/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c index f64ca52..ab05713 100644 --- a/usr.sbin/pkg_install/add/main.c +++ b/usr.sbin/pkg_install/add/main.c @@ -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); |