From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JMENN-0006PF-Cm for garchives@archives.gentoo.org; Tue, 05 Feb 2008 03:21:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D776BE05C7; Tue, 5 Feb 2008 03:21:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7CB65E05C7 for ; Tue, 5 Feb 2008 03:21:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 05BD565FE6 for ; Tue, 5 Feb 2008 03:21:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -1.84 X-Spam-Level: X-Spam-Status: No, score=-1.84 required=5.5 tests=[AWL=0.759, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sdvtIjxc-Dzg for ; Tue, 5 Feb 2008 03:21:28 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 1D2C166004 for ; Tue, 5 Feb 2008 03:21:27 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JMEN8-0007Ia-2C for gentoo-dev@gentoo.org; Tue, 05 Feb 2008 03:21:22 +0000 Received: from static24-72-115-196.yorkton.accesscomm.ca ([24.72.115.196]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Feb 2008 03:21:22 +0000 Received: from dirtyepic by static24-72-115-196.yorkton.accesscomm.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Feb 2008 03:21:22 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Ryan Hill Subject: [gentoo-dev] Re: I want to steal your tools Date: Mon, 04 Feb 2008 21:21:14 -0600 Message-ID: References: <20080205015044.GB4497@grey.iitsystems.csupomona.edu> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig5A24CD108ED9CBF6AD776993" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: static24-72-115-196.yorkton.accesscomm.ca User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20080108 Thunderbird/2.0.0.9 Mnenhy/0.7.5.0 In-Reply-To: <20080205015044.GB4497@grey.iitsystems.csupomona.edu> X-Enigmail-Version: 0.95.6 OpenPGP: id=F9A40662; url=subkeys.pgp.net Sender: news X-Archives-Salt: a836bf4e-cc02-4dcc-ac4f-071f9dde980b X-Archives-Hash: 7d563a2c691eed8befe2f1d43944b70e This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5A24CD108ED9CBF6AD776993 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Heath N. Caldwell wrote: > On 2008-02-04 14:51, Ryan Hill wrote: >> Can someone provide a tool that given a package name simply prints the= =20 >> category or cat/pkg, or if ambiguous, prints the multiple cat/pkgs or = >> returns an error code? I don't care what it's written in as long as i= t's=20 >> relatively quick. I'm sick of depending on udept (which is an incredi= ble=20 >> tool but a lot heavy for a simple shell script) just to get a simple=20 >> category. >=20 > What about something like this: >=20 > -- > #!/bin/bash >=20 > source /etc/make.globals > source /etc/make.conf >=20 > for i in ${PORTDIR} ${PORTDIR_OVERLAY}; do > (cd $i; a=3D(*/$1); [ -e ${a[0]} ] && ls -1 -d */$1) > done | sort | uniq > -- >=20 > It's really fast, at least. Also very good, thanks. Instead of sourcing, we can instead use $ portageq envvar PORTDIR $ portageq portdir_overlay How do paludis and pkgcore make this info available? --=20 fonts, by design, by neglect gcc-porting, for a fact or just for effect wxwindows @ gentoo EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 --------------enig5A24CD108ED9CBF6AD776993 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFHp9YriqiDRvmkBmIRCEFOAKDkFvirKWjaw4Fk8hVFljjjHsCFtQCfX9sr a8AYXxYE4hnsu9+KusAaQ0I= =EyHv -----END PGP SIGNATURE----- --------------enig5A24CD108ED9CBF6AD776993-- -- gentoo-dev@lists.gentoo.org mailing list