Bug 163606 - package-cleanup --oldkernels fails on SMP machines
package-cleanup --oldkernels fails on SMP machines
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2005-07-19 10:00 EDT by Michael J. Chudobiak
Modified: 2007-11-30 17:11 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-21 12:48:17 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 Michael J. Chudobiak 2005-07-19 10:00:46 EDT
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 12:12:31 EDT
known and assigned - will come back to this later.
Comment 2 Chris Hapgood 2006-09-11 23:13:41 EDT
Any liklihood of progress on this bug this year?
Comment 3 Chris Hapgood 2006-10-16 20:31:02 EDT
Hello!?  Any progress likely this year?
Comment 4 Christian Iseli 2007-01-19 18:48:18 EST
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 09:54:05 EST
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 10:27:40 EST
Reopening per comment #5

Comment 7 Chris Hapgood 2007-03-28 09:56:59 EDT
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 10:50:13 EDT
Seth, is there an upstream bugzilla this should be moved to?
Comment 9 Seth Vidal 2007-03-28 11:29:21 EDT
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 13:20:55 EDT
Presumably the same thing applies to PAE now, though....
Comment 11 Bojan Smojver 2007-05-01 21:10:19 EDT
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/depsolve.py", 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 12:48:17 EST
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.