Bug 219444 - yum dying leaves duplicate entries in RPM database
yum dying leaves duplicate entries in RPM database
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
6
All Linux
medium Severity low
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-12 22:08 EST by Michael Torrie
Modified: 2014-01-21 17:56 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-25 14:59:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Torrie 2006-12-12 22:08:26 EST
Description of problem:
If yum is interrupted or dies before it can do the cleanup phase after the
package installations, it leaves duplicate entries in the rpm database that must
be cleaned manually with rpm -e

Version-Release number of selected component (if applicable):


How reproducible:
Always.

run yum update, cause yum to die sometime during the middle of the operation. 
Packages that have not hit the cleanup stage have duplicates in the rpm
database.  For example, I did a yum update and in the middle of it, asked
gnome-terminal to open a new window. Instead gnome-terminal crashed, taking yum
with it.  This can cause the yum duplicate packages problem.  Or if you were
doing yum update over an ssh connection and lost the connection midway through
the yum update.  Happens more often than I'd like to admit.

Steps to Reproduce:
1. run yum update
2. yum dies in the middle (killed or controlling terminal crashes)
3. rpm -qa  and notice duplicates
  
Actual results:
duplicate packages

Expected results:
well, frankly I expect this result.  The problem is how to either prevent it
from happening or provide a tool to cleanup later.

Additional info:
Perhaps yum needs a commandline option to go back and make sure all the cleanup
has been done from the last yum run.
Comment 1 Jeremy Katz 2007-04-25 14:59:34 EDT
There's not really any way to fix it within yum. 
Comment 2 Michael Torrie 2007-04-25 15:07:31 EDT
Maybe a tool needs to be created to clean up after yum.  either that or have yum
keep a log of transactions so that if yum gets interrupted, another run of yum
can clean up the mess.  A third alternative is to make yum complete each rpm
transaction individually, much like the rpm command does. I can't remember how
up2date worked, but I don't think I've ever seen up2date have this same issue.

Now that RHEL5 is using yum, I would think this bug could have the potential to
cause some very interesting problems in critical production systems, even if the
probability of anyone seeing this problem is very small.

Note You need to log in before you can comment on or make changes to this bug.