Bug 390221 - package-cleanup --oldkernels cannot remove old kernel-devel
Summary: package-cleanup --oldkernels cannot remove old kernel-devel
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-19 11:41 UTC by Joachim Backes
Modified: 2007-11-30 22:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-21 17:49:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joachim Backes 2007-11-19 11:41:34 UTC
Description of problem:
Trying package-cleanup --oldkernels:

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

How reproducible:
Always.

Steps to Reproduce:
1.Trying package-cleanup --oldkernels
2.
3.
  
Actual results:
Setting up yum
I will remove the following 1 kernel related packages:
kernel-devel-2.6.23.1-10.fc7
Is this ok [y/N]: y
/usr/bin/package-cleanup:312: DeprecationWarning: returnHeaderByTuple() will go
away in a future version of Yum.

  hdr = my.rpmdb.returnHeaderByTuple(kernel)[0]
Traceback (most recent call last):
  File "/usr/bin/package-cleanup", line 402, in <module>
    main()
  File "/usr/bin/package-cleanup", line 371, in main
    removeKernels(my, opts.kernelcount, opts.confirmed, opts.keepdevel)
  File "/usr/bin/package-cleanup", line 317, in removeKernels
    my.populateTs()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 231, in populateTs
    self.ts.addErase(txmbr.po.idx)
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 682, in __getattr__
    return self.hdr[thing]
KeyError: 'unknown header tag'


Expected results:
kernel-devel-2.6.23.1-21.fc7 has been removed

Additional info: Directly using "yum erase  yum erase
kernel-devel-2.6.23.1-10.fc7" is performed well:
yum erase kernel-devel-2.6.23.1-10.fc7
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:2.6.23.1-10.fc7 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Removing:
 kernel-devel            x86_64     2.6.23.1-10.fc7  installed          15 M

Transaction Summary
=============================================================================
Install      0 Package(s)         
Update       0 Package(s)         
Remove       1 Package(s)         

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing   : kernel-devel                 ######################### [1/1] 

Removed: kernel-devel.x86_64 0:2.6.23.1-10.fc7
Complete!

Comment 1 seth vidal 2007-11-21 17:49:04 UTC
okay the traceback above is now fixed and afaict that implicitly fixes the problem.

closing as upstream.



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