Bug 329651 - package-cleanup --oldkernels : results in error
package-cleanup --oldkernels : results in error
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-12 12:21 EDT by J Robinson
Modified: 2007-12-06 23:44 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.1.8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-06 23:44:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description J Robinson 2007-10-12 12:21:51 EDT
Description of problem:

package-cleanup --oldkernels
gave an error message when trying to remove an old kernel

Version-Release number of selected component (if applicable):

How reproducible:

Try to remove old kernel kernel-
 using package-cleanup --oldkernels

Steps to Reproduce:
1. install the latest FC6 kernel, and have kernel- already installed
2. run package-cleanup --oldkernels
3. answer Y to "I will remove the following 1 kernel related packages: //
kernel- // Is this ok [y/N]"
Actual results:
# package-cleanup --oldkernels
Setting up yum
I will remove the following 1 kernel related packages:
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 ?
  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
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 171, in populateTs
AttributeError: 'YumInstalledPackage' object has no attribute 'idx'

Expected results:

old kernel to be removed, as if I did an 'rpm -ev kernel-'

Additional info:
machine was running Fedora Core 6 with
and packages listed above. Machine also reports that all packages are uptodate
via 'yum update'
Comment 1 J Robinson 2007-10-12 12:35:12 EDT
bug duplicated on second FC6 machine, also fully updated
Comment 2 Seth Vidal 2007-12-06 23:44:38 EST
this has been fixed in yum-utils 1.1.8 and above and released in f7 and f8.

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