Bug 436472 - package-cleanup --oldkernels bombs out
package-cleanup --oldkernels bombs out
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-utils (Show other bugs)
5.1
All Linux
low Severity medium
: rc
: ---
Assigned To: James Antill
James Antill
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-07 08:39 EST by Colin Simpson
Modified: 2009-06-26 14:19 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-26 14:19:05 EDT
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 Colin Simpson 2008-03-07 08:39:54 EST
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 14:42:03 EDT
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 12:40:50 EDT
I notice this is still open, it was fixed in RH5.2

Please close, it won't allow me to

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