From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FumhB-0003JT-DX for garchives@archives.gentoo.org; Mon, 26 Jun 2006 08:43:49 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k5Q8faiP006163; Mon, 26 Jun 2006 08:41:36 GMT Received: from hu-out-0102.google.com (hu-out-0102.google.com [72.14.214.200]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k5Q8aE0T018466 for ; Mon, 26 Jun 2006 08:36:14 GMT Received: by hu-out-0102.google.com with SMTP id 34so660896hud for ; Mon, 26 Jun 2006 01:36:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kf62r9xhJ0Po3rVrzMX/fqoMozlBAci9Gyd5glrYw8yrzlAOmbGc80hUMtAaypsYkOqa7om44xcruWUKwDzfEcl1VWTvTudnznfj2FHTGQL4oNUxuALMEqUvP/2OMYmzt5vPr/Xko+vk737ElVFjrAkNc6RXVQ2dMZiYsCBH3+U= Received: by 10.78.165.16 with SMTP id n16mr1936686hue; Mon, 26 Jun 2006 01:36:14 -0700 (PDT) Received: by 10.78.20.11 with HTTP; Mon, 26 Jun 2006 01:36:13 -0700 (PDT) Message-ID: <7573e9640606260136s2c50f1c6rc39499e39793e864@mail.gmail.com> Date: Mon, 26 Jun 2006 01:36:13 -0700 From: "Richard Fish" Sender: richard.j.fish@gmail.com To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] get unversioned list of installed packages without eix or esearch In-Reply-To: <200606260844.28702.bo.andresen@zlin.dk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Disposition: inline References: <200606260844.28702.bo.andresen@zlin.dk> X-Google-Sender-Auth: 9aca2b706fc6076a X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id k5Q8aE0T018466 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id k5Q8faig006163 X-Archives-Salt: 8d6f86ce-64a7-49be-98d6-b95e61544f2f X-Archives-Hash: 00e32ac9c45c176cfcfb545e2ec3adb7 On 6/25/06, Bo =D8rsted Andresen wrote: > This is probably possible with esearch too. But does anybody know of a = way to > get it with portage, bash or gentoolkit? Well, there is probably a better way to write this script, but here is a method that will do it with bash. The idea is for each package in portage, to determine whether that is installed or not. This seems a bit easier than working backwards from the installed package database: cd /usr/portage find . -name "*.ebuild" | sed -e 's/\.\///g' | while read ebuild; do pkg=3D`dirname $ebuild` category=3D`dirname $pkg` pkgdir=3D`basename $ebuild .ebuild` test -d /var/db/pkg/$category/$pkgdir && echo $pkg done | sort This works, but it does seem to take a long time! -Richard --=20 gentoo-user@gentoo.org mailing list