Re: pkg equivalent of "pkg_info -R"

看板FB_questions作者時間11年前 (2014/03/09 07:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/11 (看更多)
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"
文章代碼(AID): #1J6w4kMk (FB_questions)
討論串 (同標題文章)
文章代碼(AID): #1J6w4kMk (FB_questions)