Bug 436472

Summary: package-cleanup --oldkernels bombs out
Product: Red Hat Enterprise Linux 5 Reporter: Colin.Simpson
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED CURRENTRELEASE QA Contact: James Antill <james.antill>
Severity: medium Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-26 18:19:05 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:

Description Colin.Simpson 2008-03-07 13:39:54 UTC
Description of problem:


Version-Release number of selected component (if applicable):
package-cleanup command with oldkernels doesn't seem to work and crashes out.

How reproducible:
Everytime

Steps to Reproduce:
1. Become root and RH5 machine.
2. Run /usr/bin/package-cleanup --oldkernels --count=2

  
Actual results:
# /usr/bin/package-cleanup --oldkernels --count=2
Setting up yum
I will remove the following 6 kernel related packages:
kernel-2.6.18-8.1.14.el5
kernel-2.6.18-8.1.8.el5
kernel-2.6.18-8.el5
kernel-devel-2.6.18-8.1.14.el5
kernel-devel-2.6.18-8.1.8.el5
kernel-devel-2.6.18-8.el5
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 ?
    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.4/site-packages/yum/depsolve.py", line 174, in populateTs
    self.ts.addErase(txmbr.po.idx)
AttributeError: YumInstalledPackage instance has no attribute 'idx'


Expected results:
Expect it to remove old kernel versions

Comment 1 Colin.Simpson 2008-06-18 18:42:03 UTC
This seems to have been resolved somewhere on the road to 5.2. You can close as
far as I'm concerned.



Comment 2 Colin.Simpson 2009-06-26 16:40:50 UTC
I notice this is still open, it was fixed in RH5.2

Please close, it won't allow me to