Bug 192209 - installonlyn plugin removes wrong RPM
installonlyn plugin removes wrong RPM
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-18 09:11 EDT by David Anderson
Modified: 2014-01-21 17:54 EST (History)
1 user (show)

See Also:
Fixed In Version: fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-25 14:08:32 EDT
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 David Anderson 2006-05-18 09:11:27 EDT
Though this issue involves Livna/Madwifi, it's not Livna/Madwifi-specific - it 
will apply to any packager of any kernel modules.

I have a machine with two kernels installed, running the latter:

kernel-2.6.16-1.2096_FC5
kernel-2.6.16-1.2111_FC5

Also, I have the two corresponding madwifi kernel modules (from Livna) 
installed (with apologies to any crazed FSF zealots):

kmod-madwifi-0.0.0.20060317-3.2.6.16_1.2096_FC5
kmod-madwifi-0.0.0.20060317-4.2.6.16_1.2111_FC5

Then, Livna release an updated package for the running kernel:

kmod-madwifi-0.0.0.20060317-5.2.6.16_1.2111_FC5

When I run "yum update", yum suggests to remove 
kmod-madwifi-0.0.0.20060317-4.2.6.16_1.2096_FC5, thus leaving me with:

kernel-2.6.16-1.2096_FC5
kernel-2.6.16-1.2111_FC5
kmod-madwifi-0.0.0.20060317-4.2.6.16_1.2111_FC5
kmod-madwifi-0.0.0.20060317-5.2.6.16_1.2111_FC5

i.e. Leave me with two different kernels, but two madwifi modules for the same 
kernel. Not very useful!

I then tried running yum with --noplugins. It still offers to install the new 
kmod-madwifi for kernel 2111 without removing the old one. These two kernel 
modules then both install, owning the same files, which differ only by 
timestamp. That doesn't matter, I suppose (nothing breaks), but it's clearly 
not desired behaviour.

What should happen:
installonlyn seems to have a check that it doesn't remove packages relating to 
the running kernel. This should be made more subtle: it should not remove a 
package for the running kernel if no other package for the same kernel will 
remain. In my case, this means that it would have been happy to remove 
kmod-madwifi-0.0.0.20060317-4.2.6.16_1.2111_FC5 because 
kmod-madwifi-0.0.0.20060317-5.2.6.16_1.2111_FC5 is about to be installed.

I suspect that this, though a good step, isn't enough, as it will still 
suggest to remove the oldest package (the 2096 kernel one). Whatever mechanism 
in yum decides to install instead of updating kernel-related packages should 
also be modified somehow. I'm not sure how. It seems that the newer Livna 
packages have a "Provides: kernel-modules = <kernel-version>" that presumably 
is meant to deal with this same problem, so maybe that's already being taken 
care of.
Comment 1 David Anderson 2006-05-19 03:15:09 EDT
Today you can view the same phenomena with kmod-nvidia from the same source.

[root@shed ~]# rpm -q kmod-nvidia
kmod-nvidia-1.0.8756-1.2.6.16_1.2096_FC5
kmod-nvidia-1.0.8756-2.2.6.16_1.2111_FC5

[root@shed ~]# yum update
(snip)
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kmod-nvidia             i686       1.0.8756-3.2.6.16_1.2111_FC5  livna             
1.6 M
Updating:
(snip)
 xorg-x11-drv-nvidia     i386       1.0.8756-3.lvn5  livna             4.0 M
Removing:
 kmod-nvidia             i686       1.0.8756-1.2.6.16_1.2096_FC5  installed         
4.9 M
Comment 2 Jeremy Katz 2006-05-22 13:05:27 EDT
Do you have the fedorakmod plugin installed?
Comment 3 David Anderson 2006-05-23 05:09:02 EDT
No, I don't - should I? I've not heard of that.

Today I see there's a new kernel released, and "yum update" is offering both 
to _install_ and _update_ the very same RPM for madwifi (though not nvidia):

[david@shed ~]$ rpm -q kmod-nvidia
kmod-nvidia-1.0.8756-1.2.6.16_1.2096_FC5
kmod-nvidia-1.0.8756-2.2.6.16_1.2111_FC5
kmod-nvidia-1.0.8756-3.2.6.16_1.2111_FC5

[david@shed ~]$ rpm -q kmod-madwifi
kmod-madwifi-0.0.0.20060317-3.2.6.16_1.2096_FC5
kmod-madwifi-0.0.0.20060317-4.2.6.16_1.2111_FC5
kmod-madwifi-0.0.0.20060317-5.2.6.16_1.2111_FC5

[david@shed ~]$ su -
Password:
[root@shed ~]# yum update
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Update Process
(snip)
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel                  i686       2.6.16-1.2122_FC5  updates            13 M
 kernel-devel            i686       2.6.16-1.2122_FC5  updates           4.7 M
 kmod-madwifi            i686       0.0.0.20060520-6.2.6.16_1.2122_FC5  livna             
234 k
 kmod-nvidia             i686       1.0.8756-3.2.6.16_1.2122_FC5  livna             
1.6 M
Updating:
(snip)
 madwifi                 i386       0.0.0.20060520-6.lvn5  livna             
214 k
(snip)
Removing:
 kernel                  i686       2.6.16-1.2096_FC5  installed          34 M
 kernel-devel            i686       2.6.16-1.2096_FC5  installed          14 M
 kmod-madwifi            i686       0.0.0.20060317-4.2.6.16_1.2111_FC5  
installed         557 k
 kmod-madwifi            i686       0.0.0.20060317-3.2.6.16_1.2096_FC5  
installed         557 k
 kmod-nvidia             i686       1.0.8756-1.2.6.16_1.2096_FC5  installed         
4.9 M
 kmod-nvidia             i686       1.0.8756-2.2.6.16_1.2111_FC5  installed         
4.9 M
Installing for dependencies:
 ImageMagick-c++         i386       6.2.5.4-4.2.1    core              141 k
Updating for dependencies:
 kmod-madwifi            i686       0.0.0.20060520-6.2.6.16_1.2122_FC5  livna             
234 k

Transaction Summary
=============================================================================
Install      5 Package(s)
Update      18 Package(s)
Remove       6 Package(s)
Total download size: 41 M

Note that kmod-nvidia 0.0.0.20060520-6.2.6.16_1.2122_FC5 appears both as an 
update and as a new installation.
Comment 4 David Anderson 2006-05-23 05:36:23 EDT
Sorry, that last line should say "kmod-madwifi".
Anyway, actually trying to go ahead with that transaction fails:
Downloading Packages:
(1/23): hal-cups-utils-0. 100% |=========================|  37 kB    00:00
(snip)
(4/23): kernel-2.6.16-1.2 100% |=========================|  13 MB    03:50
(snip)
(7/23): kernel-devel-2.6. 100% |=========================| 4.7 MB    01:21
(8/23): kmod-madwifi-0.0. 100% |=========================| 234 kB    00:03
http://rpm.livna.org/fedora/5/i386/kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.rpm: 
[Errno 9] Requested Range Not Satisfiable
Trying other mirror.
http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/fedora/5/i386/kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.rpm: 
[Errno 9] Requested Range Not Satisfiable
Trying other mirror.
http://wftp.tu-chemnitz.de/pub/linux/livna/fedora/5/i386/kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.rpm: 
[Errno 9] Requested Range Not Satisfiable
Trying other mirror.
http://livna.cat.pdx.edu/fedora/5/i386/kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.rpm: 
[Errno 9] Requested Range Not Satisfiable
Trying other mirror.
(10/23): unrar-3.6.3-1.lv 100% |=========================|  98 kB    00:01
(snip)
(12/23): madwifi-0.0.0.20 100% |=========================| 214 kB    00:03
(snip)
(19/23): kmod-nvidia-1.0. 100% |=========================| 1.6 MB    00:26
(snip)
(23/23): xvidcore-1.1.0-2 100% |=========================| 239 kB    00:03


Error Downloading Packages:
  kmod-madwifi - 0.0.0.20060520-6.2.6.16_1.2122_FC5.i686: failure: 
kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.rpm from livna: [Errno 
256] No more mirrors to try.

It seems to be wanting to download it twice, as it is there:
[root@shed ~]# find /var/cache/yum/ -ls|grep 
0.0.0.20060520-6.2.6.16_1.2122_FC5.i686
 65331    8 -rw-r--r--   1 root     root         6660 May 22 
08:24 /var/cache/yum/livna/headers/kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.hdr
 65450  240 -rw-r--r--   1 root     root       239813 May 22 
08:24 /var/cache/yum/livna/packages/kmod-madwifi-0.0.0.20060520-6.2.6.16_1.2122_FC5.i686.rpm
Comment 5 David Anderson 2006-05-23 05:49:12 EDT
A subsequent run of "yum update" then succeeds (and installs kmod-madwifi - 
doesn't 'update' it).
Comment 6 David Anderson 2006-05-25 10:59:05 EDT
OK, it looks like yum-fedorakmod is something I should have. So I installed 
it.

This seems to fix the _initial_ problem (a new kmod-nvidia is released today, 
and yum now correctly suggests to install the new one and remove the old one) 
(which seems equivalent to updating the old one - presumably there's a reason 
why it _doesn't_ just update the old one).

Should I file a bug at Livna to suggest that kmod-* packages should Require: 
yum-fedorakmod ???
Comment 7 David Anderson 2006-05-25 11:05:06 EDT
No, I'm wrong. It hasn't fixed the initial problem. It's not offering to 
retain just one kmod-X package for the currently installed kernel - it's 
offering to leave me with two kmod-X packages for the current kernel, and none 
for the other installed kernel, just as before. Sorry about that - I misread 
it.

Here's what I get this time on a "yum update":

[root@shed ~]# yum update
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Loading "fedorakmod" plugin
Setting up Update Process
Setting up repositories
(snip)

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kmod-nvidia             i686       1.0.8762-1.2.6.16_1.2122_FC5  livna             
1.6 M
Updating:
(snip)
 xorg-x11-drv-nvidia     i386       1.0.8762-2.lvn5  livna             4.0 M
Removing:
 kmod-nvidia             i686       1.0.8756-3.2.6.16_1.2111_FC5  installed         
4.9 M

Here's what I had installed before running "yum update":
[root@shed cups]# rpm -q kmod-nvidia
kmod-nvidia-1.0.8756-3.2.6.16_1.2111_FC5
kmod-nvidia-1.0.8756-3.2.6.16_1.2122_FC5
[root@shed cups]# rpm -q kernel
kernel-2.6.16-1.2111_FC5
kernel-2.6.16-1.2122_FC5
[root@shed cups]# rpm -q yum-fedorakmod
yum-fedorakmod-0.6-2.fc5

However, I believe this may be because of the interdependency with 
xorg-x11-drv-nvidia which has had its version bumped, so this probably doesn't 
count as a real case.
Comment 8 David Anderson 2006-06-19 13:44:44 EDT
Here's a further datapoint.

Today there was a kmod-madwifi update available (from 
0.0.0.20060520-7.2.6.16_1.2133_FC5 to 0.9.0-1.2.6.16_1.2133_FC5). I have the 
fedora kmod yum plugin installed. yum again offers to do the wrong thing (i.e. 
remove the kmod for the old kernel, and install (not update) for the new 
kernel).

I then tried with pup instead. It claimed it was going to do the right thing 
(i.e. when you click for more details, it says it is "updating" the kmod for 
the existing kernel), but after running the transaction, it transpires that it 
didn't do what it claimed - it did the wrong thing and left me with two kmods 
for a single kernel and none for the other kernel.

Afterwards:

[root@shed ~]# rpm -q kmod-madwifi
kmod-madwifi-0.0.0.20060520-7.2.6.16_1.2133_FC5
kmod-madwifi-0.9.0-1.2.6.16_1.2133_FC5
Comment 9 Jeremy Katz 2007-04-25 14:08:32 EDT
This should all be working well AFAIK with fc6

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