> On 3 Jun, 2017, at 15:38, Beeblebrox via freebsd-ports
> <[email protected]> wrote:
>
> 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 >
>
> 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|[email protected]|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/|||
>
> 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
--
Adam Weinberger
[email protected]
https://www.adamw.org
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[email protected]"