pkg equivalent of "pkg_info -R"

Matthew Seaman matthew at FreeBSD.org
Fri Mar 7 06:54:29 UTC 2014


On 06/03/2014 23:40, Randy Pratt wrote:
>> I know "pkg info -r xxx", but this will just list ports which *directly* 
>> > depend on xxx. I could find no way to get indirect dependents too.

>> > Is there something I'm missing? Any additional utility I can install?

> I think what you're looking for is "pkg query %ro xxx".  Look under
> Multiline Patterns in man pkg-query.  Note that it only lists run
> dependencies since build dependencies are irrelevant with packages.

Actually 'pkg query %ro pkgname' and 'pkg info -r pkgname' will produce
essentially the same output.  As the OP has noted: you only get the
direct dependencies now.  This is the result of a deliberate change.
Formerly if you had a dependency chain foo -> bar -> baz then any change
to baz meant that binary packages for all three ports would have had to
be rebuilt.  With only the direct dependencies registered, now only the
bar and baz packages need rebuilding when baz gets updated.

That saves an awful lot of unnecessary churn in package repositories and
system maintainers having to update excessively large numbers of
packages on their machines.

Yes, being able to generate the entire dependency tree would be a
desirable option.  It's not particularly difficult, but it does require
implementing recursive behaviour for such lookups.  That just needs
someone to step up and code it...

Until then, you'ld have to write a shell wrapper around pkg query to
achieve the same effect.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140307/73ac6749/attachment.sig>


More information about the freebsd-questions mailing list