Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jun 2017 15:55:55 -0600
From:      Adam Weinberger <adamw@adamw.org>
To:        Beeblebrox <zaphod@berentweb.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Finding depends-on ports
Message-ID:  <53907A0D-01DF-4822-8D53-6A890FBA3939@adamw.org>
In-Reply-To: <20170604003806.5010b985@rsbsd>
References:  <20170602221856.5f239d23@rsbsd> <20170603234451.37318f11@rsbsd> <CB4DFD95-DB3C-4D24-B50D-37993F069536@adamw.org> <20170604003806.5010b985@rsbsd>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 3 Jun, 2017, at 15:38, Beeblebrox via freebsd-ports =
<freebsd-ports@freebsd.org> wrote:
>=20
> On Sat, 3 Jun 2017 14:59:36 -0600
> Thans Adam, but I need origin of depends-on, not the port its self.
> For example: # grep security/clamav INDEX-12 >
>=20
> clamav-0.99.2_4|/usr/ports/security/clamav|/usr/local|Command line
> virus scanner written entirely in =
C|/usr/ports/security/clamav/pkg-descr|garga@FreeBSD.org|security|ca_root_=
nss-3.30.2 curl-7.54.0 gmake-4.2.1_1 indexinfo-0.2.6 json-c-0.12.1 =
libltdl-2.4.6
> libnghttp2-1.23.1 libxml2-2.9.4 ncurses-6.0_3 pcre-8.40|arc-5.21p =
arj-3.10.22_4 ca_root_nss-3.30.2 curl-7.54.0 json-c-0.12.1 lha-1.14i_7 =
libltdl-2.4.6 libnghttp2-1.23.1 libxml2-2.9.4 ncurses-6.0_3 pcre-8.40 =
unzoo-4.4_2|http://www.clamav.net/|||
>=20
> The dependent packages after Maintainer field only list package
> names with version, not the origins. Thus I would have to map, for
> example, "arj-3.10.22_4" to archivers/arj

for dep in $(grep 'security/clamav|' /usr/ports/INDEX-12 | cut -f9 =
-d\|); do
	grep "^$dep" /usr/ports/INDEX-12 | cut -f2 -d\|
done

Or, much faster:
egrep "^($(fgrep 'security/clamav|' /usr/ports/INDEX-12 | cut -f9 -d\| | =
tr ' ' '|'))" /usr/ports/INDEX-12 | cut -f2 -d\|

# Adam


--=20
Adam Weinberger
adamw@adamw.org
https://www.adamw.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53907A0D-01DF-4822-8D53-6A890FBA3939>