Bug 390221 - package-cleanup --oldkernels cannot remove old kernel-devel
package-cleanup --oldkernels cannot remove old kernel-devel
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-19 06:41 EST by Joachim Backes
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-21 12:49:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joachim Backes 2007-11-19 06:41:34 EST
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 12:49:04 EST
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.