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.
This commit is contained in:
Kris Kennaway 2002-12-04 17:22:48 +00:00
parent 8d5a0b4303
commit cc865772a5
2 changed files with 3 additions and 2 deletions

View File

@ -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))

View File

@ -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