Re: pkg equivalent of "pkg_info -R"
On 03/07/2014 07:54, Matthew Seaman wrote:
> 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.
For reverse dependencies, you can abuse pkg delete:
pkg delete -Rn gnutls | grep '^[[:blank:]]'
(From the manpage, I would have thought that the q option would suppress
the first and last line, but it does not.)
This has the same result as the shell script posted in this thread aside
from containing gnutls itself, but on the positive side, it is a factor
of 100 faster on my machine.
This seems to work under normal conditions. Unfortunately, a few days
ago I had a cyclic dependency (x264<->ffmpeg), in which case "pkg delete
-R" would error and not find all reverse dependencies. Anyhow, this
should never happen and you probably want the error message in that case.
If it was only as easy as this for dependencies (not reverse).
Cheers,
Jan Henrik
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 9 之 11 篇):