# pkg provides bin/firefox usage: pkg provides [-uf] [-r repo] pattern A plugin for querying which package provides a particular file The same thing happens for every input I've tried ("pkg provides -u" etc). This is pkg-provides 0.7.2 on FreeBSD 14.0/aarch64.
Did you added 'provides' pluggin to ${PREFIX}/etc/pkg.conf? #PKG_ENABLE_PLUGINS = true; PLUGINS [ provides ];
Over to maintainer.
Hi Edwared, All the steps to enable pkg-provides are described in the pkg-message. pkg info --pkg-message pkg-provides In few words you need to register your plugin in /usr/local/etc/pkg.conf file by adding the following lines: PKG_PLUGINS_DIR = "/usr/local/lib/pkg/"; PKG_ENABLE_PLUGINS = true; PLUGINS [ provides ]; Then you can run 'pkg plugins' to see if the pkg-provides pluggin was detected. The output will be: NAME DESC VERSION provides A plugin for querying which package provides a particular file 0.7.2 At this point you can start updating the database: pkg provides -u Let me know if you still having issues with pkg-provides :)
(In reply to Rodrigo Osorio from comment #3) Edward, sorry for the typo.
I do have those lines in my config; and "pkg plugins" shows the expected output: % pkg plugins NAME DESC VERSION provides A plugin for querying which package provides a particular file 0.7.2 But it still doesn't work: % pkg provides -u usage: pkg provides [-uf] [-r repo] pattern A plugin for querying which package provides a particular file
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5a1e5ee8580010803a466ee8eeeeb5451796dd22 commit 5a1e5ee8580010803a466ee8eeeeb5451796dd22 Author: Rodrigo Osorio <rodrigo@FreeBSD.org> AuthorDate: 2022-11-13 11:43:02 +0000 Commit: Rodrigo Osorio <rodrigo@FreeBSD.org> CommitDate: 2022-11-13 11:47:44 +0000 ports-mgmt/pkg-provides: Update pkg-provides to 0.7.3 Major changes: * Fix getopt() bad usage PR: 267299 Reported by: trasz ports-mgmt/pkg-provides/Makefile | 2 +- ports-mgmt/pkg-provides/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
I was able to reproduce the issue using a FreeBSD 14 aarch64, the same version on amd64 work as expected. By the way, there was a real issue the way I handle getopt(), so thanks for the heads-up.
Hello. So... It still appears to be broken? trasz@v3:~/git/ports/ports-mgmt/pkg-provides % pkg info pkg-provides pkg-provides-0.7.3 Name : pkg-provides Version : 0.7.3 [..] trasz@v3:~/git/ports/ports-mgmt/pkg-provides % doas pkg provides -u usage: pkg provides [-uf] [-r repo] pattern A plugin for querying which package provides a particular file _But_: trasz@v3:~/git/ports/ports-mgmt/pkg-provides % pkg plugins NAME DESC VERSION provides A plugin for querying which package provides a particular file 0.7.2 Do I have something screwed up in my local setup, or did you forgot to bump the version in the source? (Also, what do you think about shortening "A plugin for querying which package provides a particular file" to "Find package providing a particular file", so that "pkg plugins" output is aligned? FWIW, I tested it on amd64, and it works perfectly :) I wonder if it would be possible to provide a periodic script to run "pkg provides -u"?