Bug 470612 - yum-complete-transaction fails with global name 'os' is not defined.
Summary: yum-complete-transaction fails with global name 'os' is not defined.
Keywords:
Status: CLOSED DUPLICATE of bug 470458
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-07 23:28 UTC by Walter Francis
Modified: 2014-01-21 23:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-08 06:10:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Walter Francis 2008-11-07 23:28:05 UTC
Description of problem:

In the current rawhide (11/07/08) updated to from the F10 pre-release, I had a yum transaction that seems to have not completed, yum alerted me to the fact.  So running yum-complete-transaction seems to do some work, but eventually fails in this fashion:

# yum-complete-transaction --cleanup-only
Loaded plugins: refresh-packagekit
Cleaning up unfinished transaction journals
Cleaning up 2008-02-03.10:26.42
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 163, 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

I have done --cleanup-only to avoid the long process of waiting for it to do transactional work, the result is the same.

The actual work to be done by the transaction might have actually completed, I think it's just failing to clean up after itself.  The original transaction had work to do for atmel-firmware and now I only see a single copy of the latest package installed.  I would expect to see an older version or two versions installed with outstanding transactions.

How reproducible:  100%

Steps to Reproduce:
1. Get an incomplete yum transaction
2. Attempt yum-complete-transaction
  
Actual results:

Fails with above result.

Expected results:

The transaction would complete, or clean-up as instructed.

Additional info:

Noted on two different installs, both i386 32 bit installs, one from F10 Snap 2 upgraded along the path until now, and another machine just recently installed F10 Pre-release and upgraded.

Comment 1 Walter Francis 2008-11-08 01:34:08 UTC
Suggested test fro mutk on #fedora was to add "import os" to the yum-complete-transaction script near the top and that fixes it.

Not sure that's the proper patch, given there are some branches in the script, but that fixes the error.

Comment 2 seth vidal 2008-11-08 06:10:39 UTC

*** This bug has been marked as a duplicate of bug 470458 ***


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