Bug 329651 - package-cleanup --oldkernels : results in error
package-cleanup --oldkernels : results in error
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
6
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2007-12-06 23:44:38 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 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):
yum-3.0.6-1.fc6 
yum-utils-1.0.3-1.fc6 
rpm-4.4.2.1-1.fc6


How reproducible:

Try to remove old kernel kernel-2.6.22.5-49.fc6
 using package-cleanup --oldkernels

Steps to Reproduce:
1. install the latest FC6 kernel, and have kernel-2.6.22.5-49.fc6 already installed
2. run package-cleanup --oldkernels
3. answer Y to "I will remove the following 1 kernel related packages: //
kernel-2.6.22.5-49.fc6 // Is this ok [y/N]"
  
Actual results:
# package-cleanup --oldkernels
Setting up yum
I will remove the following 1 kernel related packages:
kernel-2.6.22.5-49.fc6
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 171, in populateTs
    self.ts.addErase(txmbr.po.idx)
AttributeError: 'YumInstalledPackage' object has no attribute 'idx'

Expected results:

old kernel to be removed, as if I did an 'rpm -ev kernel-2.6.22.5-49.fc6'

Additional info:
machine was running Fedora Core 6 with 2.6.22.7-57.fc6
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.