yum leaving multiple versions installed

Ville Herva vherva at viasys.com
Sat Feb 4 22:19:51 UTC 2006


On Sat, Feb 04, 2006 at 04:12:27PM -0500, you [Jim Cornette] wrote:
> >>
> >>and something like this:
> >>
> >> for i in $(rpm -aq --queryformat "%{NAME}\n" | sort |
> >>            uniq -c | grep -v -E " *1 " | gawk '{print $2}'); do
> >>   rpm -e --nodeps $(rpm -q $i |head --lines=-1)
> >> done
> 
> What will happen for the kernel and gpg-pubkey?

I should have made clearer that it really is *something* like that that I
use - not *exactly* like that. The "something" part means I double check
each package before I remove them, usually by something like
 
 for i in $(rpm -aq --queryformat "%{NAME}\n" | sort |
            uniq -c | grep -v -E " *1 " | gawk '{print $2}'); do
   echo rpm -e --nodeps $(rpm -q $i |head --lines=-1)
 done > to-be-removed

and then "$EDITOR to-be-removed".

> What about Upgrading using --replacefiles --replacepkgs instead of using 
> install and --force? This worked for me when trying to make programs verify.

Might be a better idea.
 
> >>eventually kernel OOM rambo killed yum (after slaughtering 10 or so 
> >>innocent
> >>processes, bleah) which restored the box back to life. I had to manually 
> >>rpm
> >>-F the packages from /var/cache/yum/development/packages and then weed out
> >>the 30 duplicates.
> 
> Killing processes to make room for runaway processes seems to bad logic 
> in my view.

Tell me about it. The kernel OOM rambo has been like that since at least
2.2 times. Apparently, it is a really hard thing to get right judging from
the pain kernel heavy-weights (like Andrea Arcangeli, Rik van Riel and
Marcelo Tossatti) have invested in it and the relatively little progess that
has been made. Perhaps I should disable over-commit.

But Alan Cox might be the best person to comment on this...8-).

> If this happens frequently and seems to only relate to multiple entries 
> in the rpmdb, did you consider %post errors during package installation 
> might be a problem?

At least the unexpectedly interrupted "yum update" runs I have seen (and
been able to scroll up to the beginning) have not had any 5opst% errors.

> I have not seen too many yum exiting unexpectedly but have had %post 
> scriptlet errors allowing yum to finish its process and exit.

I do admit that I often run "yum update" too seldom, which cause it to bite
a huge multi-hundred package chunk that seems too much for it.

> That is a lot excessive writing to the rpmdb file and a lot more chances
> for things to go wrong. I would favor a modification to your duplicates
> script for yum or a plugin to check for no duplicate packages other than
> kernel gpg-pubkeys with a way to add other packages that could have
> multiple versions installed to its ending process.  I guess for i686 and
> 64-bit systems, expanded architecture information would give packages
> differentiation to not be considered duplicates but co-arch versions.

Yes, apart from kernel and gpg-pubkeys, I think the dupe-checker mishandles
x86/x86-64 but I don't have access to any box I could check that on. There
may be other legal multiple version installs, too.

> I've seen the same. I assume that the older files are replaced by the 
> newer version of the program. Is there a way to run a check for anything 
> that is in /usr/bin which is not owned by any installed program? (other 
> program directory locations also would be handy)

Probably something like

find /usr/bin | xargs rpm -qf | grep " is not owned by any package"


-- v -- 

v at iki.fi




More information about the fedora-test-list mailing list