Search the web
Sign In
New User? Sign Up
rpm-list · Redhat RPM List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
duplicate packages after up2date failure   Message List  
Reply | Forward Message #26825 of 26827 |
We were taking advantage of the weekend to update our RHEL4.1 machine to
RHEL4.2. It is worth mentioning that it is an x86_64 box. While
running up2date, it hung on one of the packages. There was a useradd
process sucking 99% of the CPU that couldn't be killed or traced. (It
ignored sigKILL and sigSTOP, was not a zombie or in iowait, and
[sl]trace just hung with no output (and required a kill -9) on it.
Killing its parent just got it adopted by init, with no change in
behavior. Bug report against shadow-utils has been filed [1] though I
believe that an unkillable process that uses CPU is an indication of a
problem in the kernel.

Anyway, at least a reboot fixed that. But the damage was much worse:
our RPM database appears to be mangled quite badly, and the standard
trick of rm /var/lib/rpm/__db.00[1-3] && rpm --rebuilddb doesn't help.
In particular, the RPM database now thinks that we have *both* the old
and new versions of several RPMs installed. For example:

# rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE} %{ARCH}\n" rpm
rpm-4.3.3-9_nonptl x86_64
rpm-4.3.3-11_nonptl x86_64

We have 164 packages which are duplicated in this fashion. Meanwhile
up2date wants to update them (since we have the old version) but can't
(because we have the new version). So... I'm looking for advice on how
to handle this.

My guess is that the cleanest thing to do is remove the newer of each
pair from the database and then run up2date, which should upgrade
everything (fixing any old files on disk). My proposed script for doing
this is:

for file in `rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep
-v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file | head -1 | cut
-d" " -f1; done | xargs rpm -e --justdb
up2date -p
up2date

Does this look reasonable to everyone, or is there a better way to
handle this problem?

Many thanks in advance for any advice,

Damian Menscher

[1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=170087
--
-=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
-=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
-=#| 4602 Beckman, VMIL/MS, Imaging Technology Group:(217)244-3074 |#=-
-=#| <menscher@...> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-
-=#| The above opinions are not necessarily those of my employers. |#=-

_______________________________________________
Rpm-list mailing list
Rpm-list@...
https://www.redhat.com/mailman/listinfo/rpm-list



Sat Oct 8, 2005 8:40 pm

menscher@...
Send Email Send Email

Forward
Message #26825 of 26827 |
Expand Messages Author Sort by Date

We were taking advantage of the weekend to update our RHEL4.1 machine to RHEL4.2. It is worth mentioning that it is an x86_64 box. While running up2date, it...
Damian Menscher
menscher@...
Send Email
Oct 8, 2005
8:41 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help