From owner-freebsd-ports@FreeBSD.ORG Sun Mar 13 03:39:44 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 AFF7A106566C for ; Sun, 13 Mar 2011 03:39:44 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta15.westchester.pa.mail.comcast.net (qmta15.westchester.pa.mail.comcast.net [76.96.59.228]) by mx1.freebsd.org (Postfix) with ESMTP id 6D57B8FC0C for ; Sun, 13 Mar 2011 03:39:44 +0000 (UTC) Received: from omta14.westchester.pa.mail.comcast.net ([76.96.62.60]) by qmta15.westchester.pa.mail.comcast.net with comcast id JTfY1g0041HzFnQ5FTfkVP; Sun, 13 Mar 2011 03:39:44 +0000 Received: from comcast.net ([98.203.142.76]) by omta14.westchester.pa.mail.comcast.net with comcast id JTfi1g0031f6R9u3aTfiJz; Sun, 13 Mar 2011 03:39:44 +0000 Received: by comcast.net (sSMTP sendmail emulation); Sat, 12 Mar 2011 19:39:41 -0800 Date: Sat, 12 Mar 2011 19:39:41 -0800 From: Charlie Kester To: freebsd-ports@freebsd.org Message-ID: <20110313033940.GJ79028@comcast.net> Mail-Followup-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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <4D7C2BDA.4030407@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Mailer: Mutt 1.4.2.3i X-Composer: Vim 7.3 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 03:39:44 -0000 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. 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...)