On Sun, 18 Apr 2010, J.C. Roberts wrote:
On Sun, 18 Apr 2010 18:01:15 +0930 Matthew Haub
<[email protected]> wrote:
Hello,
On Sat, Apr 17, 2010 at 11:10:30PM -0700, J.C. Roberts wrote:
Description:
The `-E` flag of pkg_info no longer works. This might be a known
issue or possibly documentation lagging behind recent changes.
There's really no need for the `-E` flag to exist in pkg_info.
How-To-Repeat:
Make sure the file we want really is installed.
$ pkg_info -aL | grep zipnote
/usr/local/bin/zipnote
/usr/local/man/man1/zipnote.1
Try to find one of the above, and result is no output:
$ pkg_info -E zipnote
$
The full path to the file/directory must be specified:
$ pkg_info -E /usr/local/bin/zipnote
/usr/local/bin/zipnote: zip-3.0
zip-3.0 create/update ZIP files compatible with PKZip(tm)
$
Multiple packages may also be returned:
$ pkg_info -E /usr/local/share/xml/
/usr/local/share/xml: docbook-4.4,libglade2-2.6.2p2
docbook-4.4 technical documentation XML/SGML definitions
libglade2-2.6.2p2 library for loading GLADE interface files at
runtime $
Matthew
Thanks for the hint on usage, but there are still bugs here. For example
$ pkg_info -E /usr/local/share/doc/
returns nothing even though there's plenty of regular files and
directories in there belonging to various ports.
Also, if given a directory name, it does not list all the installed
files matching the directory name for each matching port.
It still makes more sense to just match 'filename', either directory or
regular file, as currently (but incorrectly) stated in the man page.
It's the path of least surprise.
You can already do that with the help of pkg_mklocatedb(1).
For a quick use of the resulting database I have:
alias pkg_find="locate -d /home/iku/ports.db"
If a path name or a fully qualified file name with path must be
required, then it should be noted in the man page, along with a
caveat about the limitations.
--
Antti Harri