diff options
author | eik <eik@FreeBSD.org> | 2004-06-29 19:06:42 +0000 |
---|---|---|
committer | eik <eik@FreeBSD.org> | 2004-06-29 19:06:42 +0000 |
commit | 3883d107114d126a28a9163c5bf67cb766ec7779 (patch) | |
tree | 1ab5b5afad8e17719ffc614e8b575ec26c5c8bd5 /usr.sbin/pkg_install/version | |
parent | 338dc29a063a48607925d36ac38dd1f0263c2e8b (diff) | |
download | FreeBSD-src-3883d107114d126a28a9163c5bf67cb766ec7779.zip FreeBSD-src-3883d107114d126a28a9163c5bf67cb766ec7779.tar.gz |
- pkg_add spawns itself as argv[0] when installing dependent packages, to
enable the use as a port on older systems
- use absolute paths in all calls to external programs, to account for strange
PATH settings
- use INDEX or INDEX-5 depending on FreeBSD version, to enable the use on
FreeBSD 4.x as a port.
- conditionalize all 4.x/5.x differences on __FreeBSD_version, so that the
pkg_install tools can be kept in sync on 4.x and 5.x
- Bump PKG_INSTALL_VERSION
Reviewed by: portmgr (bento run)
MFC after: 4 weeks
Diffstat (limited to 'usr.sbin/pkg_install/version')
-rw-r--r-- | usr.sbin/pkg_install/version/Makefile | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_install/version/perform.c | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/version/Makefile b/usr.sbin/pkg_install/version/Makefile index b097a3a..23ccf39 100644 --- a/usr.sbin/pkg_install/version/Makefile +++ b/usr.sbin/pkg_install/version/Makefile @@ -5,7 +5,8 @@ SRCS= main.c perform.c CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib -WARNS?= 2 +WARNS?= 6 +WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} LDADD= ${LIBINSTALL} -lfetch -lmd diff --git a/usr.sbin/pkg_install/version/perform.c b/usr.sbin/pkg_install/version/perform.c index 837dae2..c1e952d 100644 --- a/usr.sbin/pkg_install/version/perform.c +++ b/usr.sbin/pkg_install/version/perform.c @@ -52,10 +52,9 @@ pkg_perform(char **indexarg) /* * Try to find and open the INDEX. We only check IndexFile != NULL * later, if we actually need the INDEX. - * XXX This should not be hard-coded to INDEX-5. */ if (*indexarg == NULL) - snprintf(tmp, PATH_MAX, "%s/INDEX-5", PORTS_DIR); + snprintf(tmp, PATH_MAX, "%s/%s", PORTS_DIR, INDEX_FNAME); else strlcpy(tmp, *indexarg, PATH_MAX); if (isURL(tmp)) @@ -151,7 +150,7 @@ pkg_do(char *pkg) if (plist.origin != NULL) { snprintf(tmp, PATH_MAX, "%s/%s", PORTS_DIR, plist.origin); if (isdir(tmp) && chdir(tmp) != FAIL && isfile("Makefile")) { - if ((latest = vpipe("make -V PKGNAME", tmp)) == NULL) + if ((latest = vpipe("/usr/bin/make -V PKGNAME", tmp)) == NULL) warnx("Failed to get PKGNAME from %s/Makefile!", tmp); else show_version(plist.name, latest, "port"); |