Bug 371611

Summary: Yum update interruption leaves scores of duplicate packages installed
Product: Red Hat Enterprise Linux 5 Reporter: Michael Torrie <torriem>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED CANTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-08 14:43:21 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Michael Torrie 2007-11-08 13:44:22 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.

During a yum update, if the machine is interrupted during the cleanup phase for
any reason (controlling terminal died, kernel panic because of too little ram in
a xen image, etc), packages that have not hit the cleanup stage have duplicates
in the rpm database.  

Also, doing yum update over an ssh connection and losing the connection midway
through the yum update causes this frequently.

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:
I'd expect yum to be able to clean itself up on the next run or something.

Additional info:
See bug 21944 (https://bugzilla.redhat.com/show_bug.cgi?id=219444).  Now that
yum is in RH 5, this is becoming a more critical problem.  If I install a bunch
of packages with rpm -ivh, it installs and cleans up packages one at a time
instead of batching all the operations.  Why can't yum do the same thing?  Is it
too slow?
Comment 1 Michael Torrie 2007-11-08 13:47:56 EST
Bug type above!  the bug referenced is bug 219444.
Comment 2 James Antill 2007-11-08 14:43:21 EST
 This is a hard feature to add, esp. for a RHEL-5.x update. However starting
with RHEL-5.1 we have included the yum-utils package which includes the
package-cleanup program, so there is a better method of "recovery" than rpm -e.