Bug 470776

Summary: yum-complete-transaction doesn't cleanup with new yum
Product: Red Hat Enterprise Linux 5 Reporter: James Antill <james.antill>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: James Antill <james.antill>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: ddumas, dkovalsk, james.antill, jhutar, mcepl, syeghiay, tim.lauridsen
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 22:05:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 470458    
Bug Blocks:    

Description James Antill 2008-11-10 06:51:25 UTC
+++ This bug was initially created as a clone of Bug #470458 +++

Description of problem:
I got a traceback from yum-complete-transaction:

Traceback (most recent call last):
  File "/usr/sbin/yum-complete-transaction", line 208, in <module>
    util = YumCompleteTransaction()
  File "/usr/sbin/yum-complete-transaction", line 115, in __init__
    self.main()
  File "/usr/sbin/yum-complete-transaction", line 195, in main
    self.clean_up_ts_files(timestamp, self.conf.persistdir)
  File "/usr/sbin/yum-complete-transaction", line 123, in clean_up_ts_files
    if os.path.exists(f):
NameError: global name 'os' is not defined

Version-Release number of selected component (if applicable):
yum-utils-1.1.18-1.fc10

How reproducible:
Don't know.

Steps to Reproduce:
1.I just ran 'yum-complete-transaction' after interrupting an update.
  
Actual results:
Complete output attached.

--- Additional comment from twaugh on 2008-11-07 05:06:47 EDT ---

Created an attachment (id=322836)
yum-complete-transaction-traceback.txt

--- Additional comment from twaugh on 2008-11-07 05:07:46 EDT ---

Looking more closely I see that yum-utils was one of the packages updated, so actually it was yum-utils-1.1.17-2.fc10 that gave the traceback.

--- Additional comment from svidal on 2008-11-07 08:53:58 EDT ---

was yum being updated, too, when your transaction died?

--- Additional comment from svidal on 2008-11-07 08:58:26 EDT ---

also try this yum-complete-transaction

and tell me if it fixes it

http://yum.baseurl.org/gitweb?p=yum-utils.git;a=blob;f=yum-complete-transaction.py;h=17ef3c8979a6493e62c3099768fc1a4b74a2f0da;hb=19a9ab41fc1f3eb2051287c870521edbae3f98a1

or at least changes the problem.

--- Additional comment from svidal on 2008-11-08 01:10:39 EDT ---

*** Bug 470612 has been marked as a duplicate of this bug. ***

--- Additional comment from svidal on 2008-11-08 01:16:52 EDT ---

*** Bug 470624 has been marked as a duplicate of this bug. ***

--- Additional comment from tim.lauridsen on 2008-11-09 01:11:06 EDT ---

*** Bug 470690 has been marked as a duplicate of this bug. ***

--- Additional comment from mosquito2001 on 2008-11-09 09:15:44 EDT ---

(In reply to comment #4)
> also try this yum-complete-transaction
> 
> and tell me if it fixes it
> 
> http://yum.baseurl.org/gitweb?p=yum-utils.git;a=blob;f=yum-complete-transaction.py;h=17ef3c8979a6493e62c3099768fc1a4b74a2f0da;hb=19a9ab41fc1f3eb2051287c870521edbae3f98a1
> 
> or at least changes the problem.

Hi, it did solve the issue for me. 
I had 9 'outstanding' transactions to complete (lot of them being from 2007) and everything is finally cleaned up after executing your modified yum-complete-transaction with --cleanup-only parameter (otherwise it was trying to reinstall 1200 packages). 
I wonder if it's not some leftovers of past preupgrade interrupted processes that are now taken into account because there was some fc7 in the packages it was checking.

Comment 3 RHEL Program Management 2008-11-10 07:00:37 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 17 errata-xmlrpc 2009-01-20 22:05:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0227.html