Bug 219444 - yum dying leaves duplicate entries in RPM database
Summary: yum dying leaves duplicate entries in RPM database
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 6
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-13 03:08 UTC by Michael Torrie
Modified: 2014-01-21 22:56 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-04-25 18:59:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Torrie 2006-12-13 03:08:26 UTC
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 18:59:34 UTC
There's not really any way to fix it within yum. 

Comment 2 Michael Torrie 2007-04-25 19:07:31 UTC
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.