From owner-freebsd-questions@FreeBSD.ORG Tue Apr 14 23:14:30 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D9B01065672 for ; Tue, 14 Apr 2009 23:14:28 +0000 (UTC) (envelope-from cwhiteh@onetel.com) Received: from april.london.02.net (april.london.02.net [87.194.255.143]) by mx1.freebsd.org (Postfix) with ESMTP id D9F248FC0A for ; Tue, 14 Apr 2009 23:14:27 +0000 (UTC) (envelope-from cwhiteh@onetel.com) Received: from [192.168.1.75] (93.97.24.219) by april.london.02.net (8.5.016.1) id 49D3A090009A0163; Wed, 15 Apr 2009 00:14:24 +0100 Message-ID: <49E518CF.3000105@onetel.com> Date: Wed, 15 Apr 2009 00:14:23 +0100 From: Chris Whitehouse User-Agent: Thunderbird 2.0.0.21 (X11/20090321) MIME-Version: 1.0 To: Mel Flynn References: <49E274F5.4030001@onetel.com> <200904142102.09258.mel.flynn+fbsd.questions@mailing.thruhere.net> In-Reply-To: <200904142102.09258.mel.flynn+fbsd.questions@mailing.thruhere.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tim Judd , freebsd-questions@freebsd.org Subject: Re: make run-depends-list-recursive? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 23:14:30 -0000 Mel Flynn wrote: > On Monday 13 April 2009 03:56:15 Tim Judd wrote: >> On Sun, Apr 12, 2009 at 5:10 PM, Chris Whitehouse wrote: >>> Hi >>> >>> Is there a make target which will give a list of _all_ dependencies >>> recursively not just next level up? Or a port? I tried >>> ports-mgmt/pkg_tree but it only seems to work with installed ports. >>> >>> I don't care if I get duplicates as long as every dependency is listed at >>> least once. >>> >>> Thanks >>> >>> Chris >> make all-depends-list > > Two things: > 1) It surpresses config target and if a port has OPTIONS set, then you may get > surprised once you've configured the port and ticked/unticked an option > 2) It includes EXTRACT_DEPENDS, PATCH_DEPENDS and BUILD_DEPENDS, which > typically don't end up in run dependencies. Looking at the subject this may > not be what you need. > > make -C /usr/ports/category/portname -V LIB_DEPENDS -V RUN_DEPENDS > > will list the dependencies that will be registered in /var/db/pkg. Recurse > through the list, take the second field split by : and run the above for each > origin. Something like the script below, which calls the config target if not > configured, remembers already visited dependencies and then prints the runtime > dependency list. Thanks Mel and Tim. I am trying to determine how much disk space the distfiles for a port would use. I can get the file size from the distinfo file in the port directory. So I need to list dependencies for which a distfile would be downloaded. I guess my question now is which targets or variables need to be included to achieve that. (I know it includes build dependencies. I didn't include build deps in the subject because I figured replies would give me the principle and I could expand from that.) I took a guess at the existence of BUILD_DEPENDS and added it into the script. Running the modified script on multimedia/vlc I get the same number of dependencies as make all-depends-list so make all-depends-list is the same as make -V LIB_DEPENDS -V RUN_DEPENDS -V BUILD-DEPENDS for vlc. Is that all I need for any port? thanks Chris