Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 18826

Summary: Keeping track of unstable packages
Product: Portage Development Reporter: Peter Ruskin <aoyu93>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: alain, mholzer, r.s.a.vandomburg, spider, tools-portage
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Peter Ruskin 2003-04-05 19:04:14 UTC
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
#===================================================================
Comment 1 Roderick van Domburg 2003-05-02 10:13:57 UTC
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.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2003-12-22 21:51:00 UTC

*** This bug has been marked as a duplicate of 13616 ***