Date: Mon, 26 Nov 2007 18:54:32 +0300 From: Andrew Pantyukhin <infofarmer@FreeBSD.org> To: Alex Dupre <ale@FreeBSD.org> Cc: freebsd-ports <freebsd-ports@freebsd.org> Subject: Re: how to distinguish direct/indirect requirements? Message-ID: <20071126155430.GB1637@amilo.cenkes.org> In-Reply-To: <47474D80.5090206@FreeBSD.org> References: <fi67ng$a18$1@ger.gmane.org> <20071123202524.GS66812@amilo.cenkes.org> <47474D80.5090206@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 23, 2007 at 11:00:32PM +0100, Alex Dupre wrote: > Andrew Pantyukhin wrote: > > You can cd some/port/&&make depends > > One way only. It would be more useful to know which installed ports > directly depend on a specific port. As an obvious working (but not nearly correct) example: pkg_direct_req <pkg name or regexp> #!/bin/sh indirect_reqs=`pkg_info -Rx "$1"|egrep -v '(:|^$)'` pkg_origin=`pkg_info -ox "$1"|grep -m1 /` for i in $indirect_reqs;do req_origin=`pkg_info -o "$i"|grep /` depdirs=`cd /usr/ports/$req_origin;make -V _DEPEND_DIRS` if echo $depdirs|grep -qw $pkg_origin;then echo $i is a direct req fi done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071126155430.GB1637>