The script at http://stable.gentoo.org/notes.jsp is nice but won't give an accurate representation of what unstable packages you have installed. The problem is that /var/db/pkg records what was the state when you emerged. If a package goes from unstable to stable the portage tree is updated by `emerge sync` but the installation record in /var/db/pkg is not updated. Ideally, the sync command should look also for ebuilds in /var/db/pkg. I use this script: #=================================================================== #!/bin/sh # # /usr/local/bin/list-tested # Need to run as root, for copying ebuilds: e.g. `sudo list-tested` # Lists installed ebuilds with 'ACCEPT_KEYWORDS="~x86"' # # Peter Ruskin <aoyu93@dsl.pipex.com> LOGFILE=/usr/local/var/log/list-tested-$(date +%Y-%m-%d-%H%M).log unset RESULT1 unset RESULT2 RESULT1=$(mktemp $0.XXXXXX) RESULT2=$(mktemp $0.XXXXXX) # For any '~x86' ebuilds in /var/db/pkg, first make sure they are # the latest ebuild for that version (changed KEYWORDS don't get # updated) grep -R '~x86' /var/db/pkg/*/*/*.ebuild | grep -Rv '#' | cut -d/ -f1-6 \ > $RESULT1 for a in $(cat $RESULT1); do cd $a file=$(echo $a | cut -d/ -f6).ebuild [ -e /usr/portage/*/*/$file ] && cp /usr/portage/*/*/$file ./$file done grep -R '~x86' /var/db/pkg/*/*/*.ebuild | grep -Rv '#' | cut -d/ -f5-6 \ > $RESULT2 touch $LOGFILE echo "These installed ebuilds have 'ACCEPT_KEYWORDS=\"~x86\"':" echo "These installed ebuilds have 'ACCEPT_KEYWORDS=\"~x86\"':" \ > $LOGFILE cat $RESULT2 | tee -a $LOGFILE # Clean up rm -f $RESULT1 $RESULT2 #===================================================================
Even more ideally, Portage would upgrade any emerged unstable packages to newer revisions. My system runs stable for the most part, but I have an unstable package or two installed. It would be great if Portage would understand that I want to track stable, *except* for the few unstable packages I emerged.
*** This bug has been marked as a duplicate of 13616 ***