From owner-freebsd-ports@FreeBSD.ORG Tue Aug 25 03:25:17 2009 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 41128106568C for ; Tue, 25 Aug 2009 03:25:17 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id C484E8FC23 for ; Tue, 25 Aug 2009 03:25:16 +0000 (UTC) Received: by bwz2 with SMTP id 2so1722530bwz.43 for ; Mon, 24 Aug 2009 20:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=l1Yx6QzbQIuZG+jxvq5k+hry682PU9iwFD6hbNuhTaM=; b=CO7WOpdUFOp8uPejG5qiw0OoHNdF33OjRLK/456C7vBQavQ1W/TScjEH5pGKGissWy n7p4I+0LTmIjfQTSJ3Jy5QVpson8pVoLo/+hmqrvjz5Bp5aa8O5DhYg2UCZI5obl2CJA TLbCYZ9fm/ZfN3ipjEYG/KVC2kqK0a+Ey5i+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=cxnUC0o2r23ZDt0LecAAmMuAjERnTIB473joDzcxz5ilWVLJT2iWwbjRHBlh6bw1Xf /nsULznN3RDbzFGB7w7biBRqr/H+7C2dccABRvU1MrhFOytexDv93YMA38VAqOXPbo0v jgrbKH54rxs0dAjqCb4R5cKVPPB+q/HwO5l8A= MIME-Version: 1.0 Received: by 10.239.139.79 with SMTP id s15mr587115hbs.106.1251170715653; Mon, 24 Aug 2009 20:25:15 -0700 (PDT) Date: Tue, 25 Aug 2009 03:25:15 +0000 Message-ID: From: "b. f." To: freebsd-ports@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: andrew-freebsd@areilly.bpc-users.org Subject: Re: [HEADUP] FreeBSD Gecko's TODO and plan for future 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: Tue, 25 Aug 2009 03:25:17 -0000 >Is there any convenient way to list dependencies hierarchially, >rather than the flat set that pkg_info -r provides? Yes, there is the ports-mgmt/pkg_tree port, and if you want better or more flexible graphics, you could write a script to swing through parts of a ports tree, invoke make(1) to find direct dependencies, and then output the results in, for example, .dot format, so that they can then be drawn with graphics/graphviz. Obviously, there are other ways to do this as well. I use the following script to list the origins of all installed packages that are dependent upon a given package, according to the given ports tree: #!/bin/sh PORTSDIR=${PORTSDIR:-/usr/ports} if [ "`pkg_info -E $1`" ] then dir1="`pkg_info -oq $1`" for pdir in `pkg_info -aoq` do pdepends="`make -C $PORTSDIR/$pdir -V FETCH_DEPENDS -V EXTRACT_DEPENDS -V PATCH_DEPENDS -V BUILD_DEPENDS -V RUN_DEPENDS -V LIB_DEPENDS`" ( echo "$pdepends" | grep -q -s -e "$dir1" ) && echo "$pdir" #or, if you prefer: #echo `make -C $PORTSDIR/$pdir -V PKGNAME` done else echo "$1 is not a valid package name" exit 1 fi exit 0 b.