Bug 175542

Summary: On kernel upgrade, the wrong kernel-devel package is loaded
Product: [Fedora] Fedora Reporter: james
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: sundaram
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-05 14:14:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description james 2005-12-12 15:50:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

Description of problem:
I have an older Athlon system, Athlon "Thunderbird" on a Soyo Dragon Plus motherboard, which does not seem to work with the i686 packages (kernel panic), for instance kernel-2.6.14-1.1644_FC4.i686.rpm, and instead yum and rpm install the i586 packages.  Yet, in this example, the kernel-devel-2.6.14-1.1644_FC4.i686.rpm package is loaded instead of the kernel-devel-2.6.14-1.1644_FC4.i586.rpm package.  The effective result is that there is no proper build package installed for the corresponding intalled kernel, and so module builds against the current kernel will fail.  The correct i586 kernel-devel package must then be loaded by hand.

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

How reproducible:
Always

Steps to Reproduce:
1. yum upgrade kernel
2.
3.
  

Actual Results:  i686 kernel-devel package loaded

Expected Results:  i586 kernel-devel package loaded

Additional info:

This has been going on for a while.

Comment 1 Jeff Johnson 2005-12-12 20:02:35 UTC
This is a yum, not an rpm, problem.

Comment 2 Seth Vidal 2005-12-12 23:03:05 UTC
what's in /etc/rpm/platform?

and was this hd installed on one system and moved to another?

Comment 3 james 2005-12-12 23:35:52 UTC
$ cat /etc/rpm/platform
athlon-redhat-linux

> was this hd installed on one system and moved to another?

No - native installation.

Comment 4 Seth Vidal 2005-12-15 04:54:53 UTC
please send the output of:
yum list installed kernel\*


thanks


Comment 5 james 2005-12-15 05:41:24 UTC
$ sudo yum list installed kernel\*
Installed Packages
kernel.i586                              2.6.14-1.1644_FC4      installed
kernel-devel.i586                        2.6.14-1.1644_FC4      installed
kernel-doc.noarch                        2.6.14-1.1644_FC4      installed
kernel-smp.i686                          2.6.14-1.1644_FC4      installed

yum installed the i586 kernel.  I installed the i586 kernel-devel by hand.  yum
also always installs the smp kernels, even though I don't have an smp machine.

I don't think this was the configuration last time I upgraded.  When I tried
installing the i686 kernel by hand, rpm erased a number of installed kernels
which had accumulted from upgrades.  Fortunately, there was one custom kernel
left, or I wouldn't have been able to boot the machine when the i686 kernel
would not work.

Comment 6 Seth Vidal 2005-12-19 06:19:14 UTC
at this point I'm not sure of the history of how your system got to where it is.
With all the manual interventions, etc it's hard to tell what you're trying to get.



first things first:

yum remove kernel-smp

then run yum update kernel

and see if it gets the new kernel correct.



Comment 7 james 2005-12-19 15:00:41 UTC
$ sudo yum list installed kernel\*
Installed Packages
kernel.i586                              2.6.14-1.1644_FC4      installed
kernel-devel.i586                        2.6.14-1.1644_FC4      installed
kernel-doc.noarch                        2.6.14-1.1644_FC4      installed
kernel-smp.i686                          2.6.14-1.1644_FC4      installed

$ sudo rpm -e kernel-smp

$ sudo yum list installed kernel\*
Installed Packages
kernel.i586                              2.6.14-1.1644_FC4      installed
kernel-devel.i586                        2.6.14-1.1644_FC4      installed
kernel-doc.noarch                        2.6.14-1.1644_FC4      installed

$ sudo yum -y update kernel
...
Installed: kernel.i586 0:2.6.14-1.1653_FC4

$ sudo yum list installed kernel\*
Installed Packages
kernel.i586                              2.6.14-1.1644_FC4      installed
kernel.i586                              2.6.14-1.1653_FC4      installed
kernel-devel.i586                        2.6.14-1.1644_FC4      installed
kernel-doc.noarch                        2.6.14-1.1644_FC4      installed

In this case, yum has failed to find any dependency with kernel-devel.i586 or
with kernel-doc.noarch.  I will have to install these manually or run yum again
to explicitly load kernel-devel and kernel-doc, so more manual intervention.

$ sudo yum -y update kernel-devel
...
Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel-devel            i686       2.6.14-1.1653_FC4  updates-released  4.1 M
...

So, this is the original problem - yum loads the wrong kernel-devel package,
which I now _have_ to load manually, since yum is no help:

$ sudo yum -y install kernel-devel.i586
...
Nothing to do

kernel-doc.noarch of course has no architecture relationship.

BTW, the original kernel-smp installation was performed by the Fedora Core 4
installer.

Comment 8 Seth Vidal 2005-12-19 15:54:55 UTC
There is no dependency from kernel on kernel-devel.
So that's why when you do:
yum update kernel
it doesn't grab kernel-devel, too.

the problem is that kernel-devel is not in the exactarchlist so yum is,
correctly, trying to upgrade it to the .i686 package b/c i686 is an 'upgrade'
over i586 when the package is not in the exactarchlist.

wanna test it? In your yum.conf under [main] add:

exactarchlist = kernel kernel-smp glibc kernel-hugemem kernel-enterprise
kernel-bigmem kernel-devel


all on one line

then remove the i686 kernel-devel and run yum update kernel-devel.

I bet it will work fine then.

Comment 9 james 2005-12-19 18:49:23 UTC
$ sudo vim /etc/yum.conf 
...
$ sudo rpm -e kernel-devel-2.6.14-1.1653_FC4
...
$ sudo yum -y update kernel-devel
...
Installed: kernel-devel.i586 0:2.6.14-1.1653_FC4
Complete!

Sure enough, that seems to fix the problem for me.  Hopefully, kernel-devel will
be added to the exactarchlist.

I still find that having fedora install kernel files for different architectures
- i586, i686 - using the _same_ file names, and worse, the same short package
names, causes confusion and consequent problems at times.  I suppose that there
is not much yum can do about that though.  "rpm -q kernel" is useless.  At least
"yum list installed kernel\*" tells which architecture is installed, even though
it is slow to run.

BTW, I saw yum time-out a slow mirror site, select a new mirror, and continue
the install - all by itself.  Very nice.


Comment 10 james 2006-02-27 16:18:49 UTC
This seems to be acting up again - I upgraded to kernel-2.6.15-1.1831_FC4 and,
despite the existance of 

 exactarchlist = kernel kernel-smp glibc kernel-hugemem kernel-enterprise
kernel-bigmem kernel-devel

in /etc/yum.conf, yum just installed kernel-devel.i686 instead of kernel-devel.i586.

Now, during the upgrade, I'm running the ccrma real-time i686 kernel, which
seems to run fine on this Athlon machine, so it makes sense that yum might
assume an i686 architecture looking at the running kernel, but that would be an
error.  Yum chose the i586 kernel for the upgrade, and should choose the
corresponding i586 kernel-devel package as well.

Any ideas?


Comment 11 Seth Vidal 2006-02-28 03:29:05 UTC
send me:

yum list installed kernel\*

please.


Comment 12 james 2006-02-28 04:24:08 UTC
$ yum list installed kernel\*
Installed Packages
kernel.i586                              2.6.15-1.1831_FC4      installed
kernel.i586                              2.6.14-1.1656_FC4      installed
kernel.i586                              2.6.15-1.1830_FC4      installed
kernel.i686                              2.6.14-0.10.rrt.rhfc4. installed
kernel-devel.i586                        2.6.15-1.1830_FC4      installed
kernel-devel.i686                        2.6.15-1.1831_FC4      installed
kernel-devel.i686                        2.6.14-0.10.rrt.rhfc4. installed
kernel-devel.i586                        2.6.14-1.1656_FC4      installed
kernel-doc.noarch                        2.6.15-1.1831_FC4      installed
kernel-module-alsa-2.6.14-0.10.rrt.rhfc4 1.0.10-1.rhfc4.ccrma   installed

Comment 13 Seth Vidal 2006-03-05 01:10:26 UTC
okay here is my only and best suggestion:

choose a kernel architecture and go with it, do not mix and match like you're
doing above - that's causing this problem and in a normal situation this would
never happen.

the reason why yum is getting confused, most likely is that a better arch is
trumping a better version. Hence the i686 kernel-devel and i586 kernel.

I don't see this as a yum bug anymore but a system that's just horribly mangled.




Comment 14 james 2006-03-05 06:31:40 UTC
Let's look at this more simply:

/lib/modules/<idiot-version>/build is a link to ../../../usr/src/kernels/<version>/

_That_ is a dependency.  The target of the link is either present or missing.
All yum is supposed to do is install somthing called "kernel-devel-<version>".

Here is another clue:
yum installs something called "kernel-<version>".  The package it depends upon
is called, again, "kernel-devel-<version>".

If that's too complex for yum, then yum has some very deep and serious design
problems.

Of course there is also the idiocy of giving different versions of a package the
_same_ install name, and it must be assumed that yum can tell the difference.

Yum can tell the diffence between versions, right?

Comment 15 Seth Vidal 2006-03-05 14:14:39 UTC
it's not about version. It is about arch.

Your sarcasm and invective is not helpful.


Comment 16 james 2006-03-06 03:39:22 UTC
I'm not kidding.

If you can't figure out how to find the name of the presently-running kernel and
add the string "devel-" into the middle of it...

No, it is NOT about "arch".