Sunday, January 15, 2006

Restore package.keywords

Gentoo: I've accidentally removed /etc/portage/package.keywords. There is a quick way to restore it (found on some newsgroup and here for reference):

find /var/db/pkg/ -name \*.ebuild -print | xargs egrep "^KEYWORDS.*~x86"
| sed -e 's!/var/db/pkg/!!g' | sed -e 's/.ebuild:KEY.*//g' | sed -e
's/-[0-9][0-9]*.*/ ~x86/g' | sort -u > /etc/portage/package.keywords

It worked very well for me :-)
Post a Comment