On 13/03/2011 03:39, Charlie Kester wrote: > On Sat 12 Mar 2011 at 18:28:42 PST Doug Barton wrote: >> On 03/12/2011 18:13, per...@pluto.rain.com wrote: >>> Charlie Kester<corky1...@comcast.net> wrote: >>> >>>> A few minutes ago, I was answering a post on the forums, in which >>>> a user expressed surprise (and outrage) that the phpmyadmin port >>>> was installing libX11 and similar things on his server. By >>>> installing it myself and then using "pkg_tree -v" to examine the >>>> dependencies, I was able to narrow it down to two of the port's >>>> options that were ON by default. >>>> >>>> I'm not aware of any tool that will display a similar dependency >>>> tree for a port *before* it is installed. "make all-depends-list" >>>> creates exactly what it suggests, a list, and doesn't show any >>>> of the hierarchical info that is needed to answer questions like >>>> the one I was working on. If there is such a tool, I'd love to >>>> hear about it. >>> >>> Would something along the lines of "make -n fetch-recursive" >>> help at all? I would expect it to walk the dependency tree >>> in a predictable order. >> >> The problem with the pre-existing targets is that they do not take the >> user's choices in OPTIONS into account. portmaster's technique (while >> not perfect) at least does that. > > True, but that's not really needed in order to answer questions like > "Why is this port installing foo?" Once we know which dependency leads > to foo, we can look to see if there's an option to disable it somewhere > up the tree. > > Same for the original problem at the start of this thread. Once we know > where foo gets pulled in, we can look to see if it's a BUILD or a RUN > dependency. (Although it would be nice if whatever tool is displaying > the tree would have indicated that already, just as it would nice if > portions of the tree were "greyed out" if the controlling options are > turned off...)
Well, this seems to be turning into a bit of a band-wagon. Here's my attempt to jump on it. Since I already had about 90% of the necessary code already in my FreeBSD::Portindex stuff, I've added a new 'portdepends' script. This generates a detailed dependency tree printout for a port using the data stored in the portindex cache. Output looks like this: % portdepends textproc/sphinxsearch [......] sphinxsearch-0.9.9 (textproc/sphinxsearch) [.....L] - libiconv-1.13.1_1 (converters/libiconv) [...B..] - - libtool-2.4 (devel/libtool) [.....L] - mysql-client-5.1.55 (databases/mysql51-client) [...BR.] - - openssl-1.0.0_5 (security/openssl) [...B..] - - - makedepend-1.0.3,1 (devel/makedepend) [...BR.] - - - - pkg-config-0.25_1 (devel/pkg-config) [...B..] - - - - - gmake-3.81_4 (devel/gmake) [.....L] - - - - - - gettext-0.18.1.1 (devel/gettext) [.....L] - - - - - - - libiconv-1.13.1_1 (converters/libiconv) [...B..] - - - - - - - - libtool-2.4 (devel/libtool) [...B..] - - - - - - - libtool-2.4 (devel/libtool) [...BR.] - - - - xproto-7.0.16 (x11/xproto) [...BR.] - - - - - pkg-config-0.25_1 (devel/pkg-config) [...B..] - - - - - - gmake-3.81_4 (devel/gmake) [.....L] - - - - - - - gettext-0.18.1.1 (devel/gettext) [.....L] - - - - - - - - libiconv-1.13.1_1 (converters/libiconv) [...B..] - - - - - - - - - libtool-2.4 (devel/libtool) [...B..] - - - - - - - - libtool-2.4 (devel/libtool) [EP.B..] - - - perl-5.10.1_3 (lang/perl5.10) [.....L] - expat-2.0.1_1 (textproc/expat2) The left hand column shows the type of dependency: one of Extract, Patch, Fetch (v. rare), Build, Run or Lib. It's kind of repetitive, unlike Mark Linimon's python script, mostly because I wanted to keep the code relatively simple. Download here: http://www.infracaninophile.co.uk/portindex/FreeBSD-Portindex-2.3.tar.bz2 I'll submit a ports PR shortly. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature