Am I missing some command flag?
pkg-rquery(8) doesn't offer the possibility to query for files in a package; I imagine that information is not stored in the local copy db of the remote repository. The best option, before actually installing, seems to be the longer road via first fetching the package, then querying the package file. Install the package, either using the normal route using pkg-install(8) or using pkg-add(8) using the the downloaded package files. For example using lsof:Sure after the fact.
[1-0] # pkg fetch -o . lsof
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
All repositories are up to date.
The following packages will be fetched:
New packages to be FETCHED:
lsof: 4.99.5,8 (117 KiB: 100.00% of the 117 KiB to download)
Number of packages to be fetched: 1
117 KiB to be downloaded.
Proceed with fetching packages? [y/N]: y
Fetching lsof-4.99.5,8.pkg: 100% 117 KiB 119.7kB/s 00:01
[2-0] # pkg query --file ./All/lsof-4.99.5,8.pkg '%Fp'
/usr/local/share/licenses/lsof-4.99.5,8/catalog.mk
/usr/local/share/licenses/lsof-4.99.5,8/LICENSE
/usr/local/share/licenses/lsof-4.99.5,8/lsof
/usr/local/share/man/man8/lsof.8.gz
/usr/local/sbin/lsof
/usr/local/share/lsof/00MANIFEST
/usr/local/share/lsof/00README
/usr/local/share/lsof/big_brother.pl
/usr/local/share/lsof/count_pf.pl
/usr/local/share/lsof/identd.pl
/usr/local/share/lsof/idrlogin.pl
/usr/local/share/lsof/list_NULf.pl
/usr/local/share/lsof/list_fields.awk
/usr/local/share/lsof/list_fields.pl
/usr/local/share/lsof/shared.pl
/usr/local/share/lsof/sort_res.pl
/usr/local/share/lsof/watch_a_file.pl
/usr/local/share/lsof/xusers.awk
[3-0] #
webkit2-gtk_60 was fun MiniBrowser but it isn't extracted to a bin folder:/usr/local/libexec/webkitgtk-6.0/MiniBrowser
pkg info -l 'webkit2-gtk_60' | grep 'bin', but there's no hint of minbrowser.Not all ports have one. Some generate the pkg-plist dynamically.They're listed in the plist file under the port path
OK I install a package and now what? I have to run a search for newest files?
Why doespkg installoutput not show you what was installed and where? pkg-descr is only so useful.
Why not an output report. What file and where was it placed.. Am I missing some command flag?
Apropos not matching the port name, not only non-trivial ports but also trivial ports like deskutils/bookworm are affected. I had to look up the packages binary name, the "bookworm" command couldn't be found.[*]'non-trivial port' meaning something that doesn't come with an executable and manpage with the same name as the port
% pkg list bookworm | grep bin
/usr/local/bin/com.github.babluboy.bookworm
And some ports having pkg-plist manipulates it using temporary file, add some, drop some and modify some.Not all ports have one. Some generate the pkg-plist dynamically.
pkg info -l $1 | sed s/^[[:space:]]*//g | while read file; do
if [ -x "$file" ]; then
echo "$file"
fi
done
I like thata little script could help you to find executable files in package
#!/bin/sh
pkg info -l "$1" | sed s/^[[:space:]]*//g | while read filename; do
if [ -f "${filename}" ] && [ -x "${filename}" ]; then
file "${filename}"
fi
done
You need not use sed(1) to remove the lead-in; usea little script could help you to find executable files in package
pkg query '%Fp' <pkg-name> instead.