Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] get unversioned list of installed packages without eix or esearch
Date: Mon, 26 Jun 2006 08:43:49
Message-Id: 7573e9640606260136s2c50f1c6rc39499e39793e864@mail.gmail.com
In Reply to: [gentoo-user] get unversioned list of installed packages without eix or esearch by "Bo Ørsted Andresen"
1 On 6/25/06, Bo Ørsted Andresen <bo.andresen@××××.dk> wrote:
2 > This is probably possible with esearch too. But does anybody know of a way to
3 > get it with portage, bash or gentoolkit?
4
5 Well, there is probably a better way to write this script, but here is
6 a method that will do it with bash. The idea is for each package in
7 portage, to determine whether that is installed or not. This seems a
8 bit easier than working backwards from the installed package database:
9
10 cd /usr/portage
11 find . -name "*.ebuild" | sed -e 's/\.\///g' | while read ebuild; do
12 pkg=`dirname $ebuild`
13 category=`dirname $pkg`
14 pkgdir=`basename $ebuild .ebuild`
15 test -d /var/db/pkg/$category/$pkgdir && echo $pkg
16 done | sort
17
18 This works, but it does seem to take a long time!
19
20 -Richard
21
22 --
23 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] get unversioned list of installed packages without eix or esearch Alexander Skwar <listen@×××××××××××××××.name>