Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163606 - package-cleanup --oldkernels fails on SMP machines
Summary: package-cleanup --oldkernels fails on SMP machines
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 5
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2005-07-19 14:00 UTC by Michael J. Chudobiak
Modified: 2007-11-30 22:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-21 17:48:17 UTC

Attachments (Terms of Use)

Description Michael J. Chudobiak 2005-07-19 14:00:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
"package-cleanup --oldkernels" only examines "kernel" packages, and ignores "kernel-smp" packages, making it useless for SMP machines. I think the script should be modified so that the comparison in line 141 of the script uses the value of DEFAULTKERNEL from /etc/sysconfig/kernel, instead of just "kernel".

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

How reproducible:

Steps to Reproduce:
1. run "package-cleanup --oldkernels" as root on a machine using the kernel-smp package.  

Actual Results:  [root@server2 ~]# package-cleanup --oldkernels
Setting up yum
There are only 0 kernels installed of maximum 2 kernels, nothing to be done

Expected Results:  Remove all but the two most recent kernel-smp packages.

Additional info:

Comment 1 Seth Vidal 2005-07-22 16:12:31 UTC
known and assigned - will come back to this later.

Comment 2 Chris Hapgood 2006-09-12 03:13:41 UTC
Any liklihood of progress on this bug this year?

Comment 3 Chris Hapgood 2006-10-17 00:31:02 UTC
Hello!?  Any progress likely this year?

Comment 4 Christian Iseli 2007-01-19 23:48:18 UTC
FC3 and FC4 have now been EOL'd.

Please check the ticket against a current Fedora release, and either adjust the
release number, or close it if appropriate.


Your friendly BZ janitor :-)

Comment 5 Chris Hapgood 2007-01-20 14:54:05 UTC
I'm having the problem with FC5 as well -but not being the owner of the case I
can't change the version.

Comment 6 Roozbeh Pournader 2007-01-21 15:27:40 UTC
Reopening per comment #5

Comment 7 Chris Hapgood 2007-03-28 13:56:59 UTC
Any progress likely this DECADE?  I mean, seriously, this bug was reported
almost two years ago and it can't be that hard to fix.  I know it not the most
critical bug, but two years is absurd.  Why not just state that "due to the lack
of severity, this bug will not be fixed."

It has been in every version of Fedora I've used (3, 4, and 5).


Comment 8 Matthew Miller 2007-03-28 14:50:13 UTC
Seth, is there an upstream bugzilla this should be moved to?

Comment 9 Seth Vidal 2007-03-28 15:29:21 UTC
There's not. Though, to be fair, the reason why it got forgotten about is b/c
after FC6 we don't have smp kernels anymore and it wasn't really relevant to fix.

Comment 10 Matthew Miller 2007-03-28 17:20:55 UTC
Presumably the same thing applies to PAE now, though....

Comment 11 Bojan Smojver 2007-05-02 01:10:19 UTC
Actually, I'm getting this on FC6:

# package-cleanup --oldkernels --count=1
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/", line 171, in populateTs
AttributeError: 'YumInstalledPackage' object has no attribute 'idx'

This is just with the regular kernel.

Comment 12 seth vidal 2007-11-21 17:48:17 UTC
okay - this is fixed in yum-utils git upstream. Thanks for the report.

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