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 |