Gentoo Archives: gentoo-sparc

From: Paul Heinlein <heinlein@××××××.com>
To: Gentoo Sparc List <gentoo-sparc@l.g.o>
Subject: [gentoo-sparc] Forcing package check
Date: Sat, 16 Sep 2006 17:03:23
Some time ago, I'd begun to think that perhaps the Gentoo package 
system on my SPARC had become somewhat corrupted. (Snip long story 
about SunBlades and IDE corruption...) Queries concerning installed 
packages seemed to execute correctly, but "emerge -uvD world" seemed 
to ignore packages that really needed to be upgraded.

I finally got around to brute-forcing the portage system into querying 
every single installed package to see if it was in need of an update. 
The resulting pipe sequence is convoluted and takes a while to run, 
but it seems to do the job. Oh, and you'll also need to have the epm 
ebuild installed.

    epm -qGa |\
    sed -e 's/-r[0-9][0-9]*$//' -e 's/-[^-]*$//' |\
    sort -u |\
    (while read n; do emerge -puv "$n"; done) |\
    grep -w ebuild

In semi-plain English, the procedure is

1. Get list of all installed ebuilds, complete with group name
2. Remove release and version numbers from ebuild names
3. Remove duplicates, common with slotted ebuilds
4. Loop over each ebuild name looking for updates
5. Important output from emerge has word "ebuild" in the string

Someone will probably now tell me that there's a nifty prebuilt tool 
for this sort of work... :-)

Paul Heinlein <> heinlein@××××××.com <>

gentoo-sparc@g.o mailing list


Subject Author
Re: [gentoo-sparc] Forcing package check Andrew Gaffney <agaffney@g.o>