Prompted by the recent EOL announcement and the very loud pkg_install
warning, I recently migrated about a dozen systems to pkgng.  So far the
only thing I've tripped over is the pkg-version(8) tool ignoring its
index argument.  The tool appears to do a good job of maintaining
backwards compatibility with its venerable predecessor:

usage: pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string]
                   [-O origin] [index]
       pkg_version -t v1 v2
       pkg_version -T name pattern

Usage: pkg version [-IPR] [-hoqvU] [-l limchar] [-L limchar] [-egix pattern]
                   [-r reponame] [-O origin] [index]
       pkg version -t <version1> <version2>
       pkg version -T <pkgname> <pattern>

but the new tool completely ignores its optional [index] argument and,
if I request use of an INDEX via -I, it will only work if there is an
INDEX file in the ports tree directory.  A missing ports tree directory
is also a fatal error.

I have submitted a PR (ports/186671) in which I provide a patch to
pkg/version.c to rectify this problem.  The patch:

 - removes the requirement for /usr/ports when using an index (-I)

 - reads and uses the optional index file argument which, if present,
   will supersede the default file in /usr/ports.

I am not a programmer, so please excuse and correct anything which is
done improperly.  "It works for me."

-- 
John Marshall

Attachment: pgpdZt3LnDljQ.pgp
Description: PGP signature

Reply via email to