From cc865772a5000391bab73cdc11fe2c602abdcb23 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Wed, 4 Dec 2002 17:22:48 +0000 Subject: [PATCH] Minimal change to cause pkg_version to examine the new INDEX-5 file instead of INDEX. This should be done better since this file name will depend on the FreeBSD major version. --- usr.sbin/pkg_install/version/perform.c | 3 ++- usr.sbin/pkg_install/version/pkg_version.1 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_install/version/perform.c b/usr.sbin/pkg_install/version/perform.c index ac3972784b54..db2fb19c3cc7 100644 --- a/usr.sbin/pkg_install/version/perform.c +++ b/usr.sbin/pkg_install/version/perform.c @@ -51,9 +51,10 @@ 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", PORTS_DIR); + snprintf(tmp, PATH_MAX, "%s/INDEX-5", PORTS_DIR); else strlcpy(tmp, *indexarg, PATH_MAX); if (isURL(tmp)) diff --git a/usr.sbin/pkg_install/version/pkg_version.1 b/usr.sbin/pkg_install/version/pkg_version.1 index e252210080a4..f45acba03f40 100644 --- a/usr.sbin/pkg_install/version/pkg_version.1 +++ b/usr.sbin/pkg_install/version/pkg_version.1 @@ -64,7 +64,7 @@ cannot be located, .Nm will search for the package in the ports collection index file (typically -.Pa /usr/ports/INDEX ) . +.Pa /usr/ports/INDEX-5 ) . Any matching version number(s) there will be used to determine whether the installed package is up-to-date or requires updating. .Pp