On Fri May 9, 2025 at 1:23 AM UTC, Morgan Aldridge wrote:
> This is a common misconception and a confusing aspect of pkg_info(1)'s
> options and options parsing.
>
> The '-a' option[0] lists the installed packages, but can't be combined with
> pkg-name arguments.
>
> The '-Q' option[1] takes a substring argument and searches in only the
> first repository of the package search path for package names containing
> that substring.
>
> The important thing to note is that the first repository is the "packages/"
> subdirectory, which will be the -release packages (or the -current
> packages, if running snapshots). If you're running -release and want the
> search to include -stable packages (i.e. the "packages-stable/"
> subdirectory; which `pkg_add -u` will include), then you can add the '-a'
> option. Confusingly, this is _not_ the same '-a' option as mentioned above.
>
> One can't use `pkg_info -Qa substring` because the 'a' would be parsed as
> the substring, so one would use`pkg_info -aQ substring` to search package
> names for the substring (as you've been doing.)
>
> As you've also since noticed, `pkg_info -Pa` will show the pkgpath(7) for
> all installed packages.
>
> [0] <https://man.openbsd.org/pkg_info#a>
> [1] <https://man.openbsd.org/pkg_info#Q>
>
> Morgan

Hi Morgan,

Thank you for explaining!

I'm moving ahead with testing and trying to pull down all of the
distfiles. I did pkg_info -Pa | grep /, and working with that list I was
able to do dpb -F4 $(cat ~/packages). dpb -F4 -P ~/packages didn't work
for me.

I also tried dpb -r -F4 $(cat ~/packages) -- which pulled down no
additional dependencies.

I got the size and file count of /usr/ports/distfiles to then try
building all of the packages and see if the amount increased.
Unfortunately, I've had no luck here.

dpb $(cat ~/packages) didn't seem to build anything, and didn't throw
any errors.

dpb -P ~/packages refuses to run. It says "Bad package path."

I've tried removing packages with commas in them and had the same
result.

Not sure how to debug this or what's expected. I'm running this on a
different system that doesn't have these installed, if it matters.

Thank you!

-Henrich

Reply via email to