Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2011 19:55:38 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-ports@freebsd.org
Subject:   Re: Superfluous dependencies
Message-ID:  <4D7D213A.8000009@infracaninophile.co.uk>
In-Reply-To: <20110313033940.GJ79028@comcast.net>
References:  <AANLkTik65O3gbUoVBM-YbjWu0dpq0OuNn2KoUaC5b5ov@mail.gmail.com>	<4D76426A.2010006@secnap.com>	<AANLkTi=j7fR%2BRm4Fy14Q_KPDyE%2B7%2BO_d3pd3Yaek=kJG@mail.gmail.com>	<20110312215307.GB26099@lonesome.com>	<20110312221233.GD79028@comcast.net>	<4d7c2841.Luv9s8bmxfYBYXYS%perryh@pluto.rain.com>	<4D7C2BDA.4030407@FreeBSD.org> <20110313033940.GJ79028@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE77A237210895AA65F4A1201
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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, perryh@pluto.rain.com wrote:
>>> Charlie Kester<corky1951@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.
>=20
> 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.
>=20
> 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

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enigE77A237210895AA65F4A1201
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk19IUEACgkQ8Mjk52CukIwr9wCfUWQlgVBvP4F7psfG2A1xGUAj
q3IAnRRPXiZWBNnHz9OGzOUnzSNkQhbU
=0H7/
-----END PGP SIGNATURE-----

--------------enigE77A237210895AA65F4A1201--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D7D213A.8000009>