On 6/25/06, Bo Ørsted Andresen <[EMAIL PROTECTED]> 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=`dirname $ebuild`
   category=`dirname $pkg`
   pkgdir=`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

--
gentoo-user@gentoo.org mailing list

Reply via email to