From owner-freebsd-ports@FreeBSD.ORG Sun Mar 13 19:55:49 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F0A106566B for ; Sun, 13 Mar 2011 19:55:49 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id E59848FC0C for ; Sun, 13 Mar 2011 19:55:48 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id p2DJtjmd032257 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sun, 13 Mar 2011 19:55:45 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p2DJtjmd032257 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1300046145; bh=AnTszShWPTl3vf48CrtKmlFhevQm69Ff/5fhvKU6iZY=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4D7D213A.8000009@infracaninophile.co.uk>|Date:=20S un,=2013=20Mar=202011=2019:55:38=20+0000|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20U=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20en-US=3B=20r v:1.9.2.15)=20Gecko/20110303=20Thunderbird/3.1.9|MIME-Version:=201 .0|To:=20freebsd-ports@freebsd.org|Subject:=20Re:=20Superfluous=20 dependencies|References:=20=09<4D76426A.2010006@secnap.com>=09=09<2011 0312215307.GB26099@lonesome.com>=09<20110312221233.GD79028@comcast .net>=09<4d7c2841.Luv9s8bmxfYBYXYS%perryh@pluto.rain.com>=09<4D7C2 BDA.4030407@FreeBSD.org>=20<20110313033940.GJ79028@comcast.net>|In -Reply-To:=20<20110313033940.GJ79028@comcast.net>|X-Enigmail-Versi on:=201.1.1|OpenPGP:=20id=3D60AE908C|Content-Type:=20multipart/sig ned=3B=20micalg=3Dpgp-sha1=3B=0D=0A=20protocol=3D"application/pgp- signature"=3B=0D=0A=20boundary=3D"------------enigE77A237210895AA6 5F4A1201"; b=f+MUWNDvTJxmixEWQZpuzD8gtbHcN/sknyaUGPo9rUswlD6QDFsrkmKgngqGO2i2J FH+9LcOwVUd96pdmStjxeYL0yZCwtKOgZNutOuZwm6hrvdaRRKTIAMDcVoUIqc+5IK 33zufmzh5+ozQ8ir8kaZXVECvOKH1K7GmrgzxFrI= Message-ID: <4D7D213A.8000009@infracaninophile.co.uk> Date: Sun, 13 Mar 2011 19:55:38 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4D76426A.2010006@secnap.com> <20110312215307.GB26099@lonesome.com> <20110312221233.GD79028@comcast.net> <4d7c2841.Luv9s8bmxfYBYXYS%perryh@pluto.rain.com> <4D7C2BDA.4030407@FreeBSD.org> <20110313033940.GJ79028@comcast.net> In-Reply-To: <20110313033940.GJ79028@comcast.net> X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE77A237210895AA65F4A1201" X-Virus-Scanned: clamav-milter 0.97 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Subject: Re: Superfluous dependencies X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 19:55:49 -0000 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 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--