From owner-freebsd-ports@freebsd.org Sat Jun 3 21:56:00 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 024CBBF9BD7 for ; Sat, 3 Jun 2017 21:56:00 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 426A77F3BD for ; Sat, 3 Jun 2017 21:55:59 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id a7da2cfc TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sat, 3 Jun 2017 15:55:56 -0600 (MDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Finding depends-on ports From: Adam Weinberger In-Reply-To: <20170604003806.5010b985@rsbsd> Date: Sat, 3 Jun 2017 15:55:55 -0600 Cc: freebsd-ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <53907A0D-01DF-4822-8D53-6A890FBA3939@adamw.org> References: <20170602221856.5f239d23@rsbsd> <20170603234451.37318f11@rsbsd> <20170604003806.5010b985@rsbsd> To: Beeblebrox X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 21:56:00 -0000 > On 3 Jun, 2017, at 15:38, Beeblebrox via freebsd-ports = 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