dkms removes kernel module when installing/upgrading
Matt Domsch
Matt_Domsch at dell.com
Wed Jun 6 13:35:29 CDT 2007
On Wed, Jun 06, 2007 at 07:21:19PM +0100, Z? wrote:
> I have been testing dkms-2.0.16 and i can reach the conclusion that when
> upgrading a dkms package and the module kernel is the same, what dkms do,
> first installs the kernel module (as expected) but then removes it (and that
> is a total unexpected behaviour).
>
> But ill paste here the complete output of the install/upgrade:
Yep. Here's what's happening:
> + /usr/sbin/dkms --rpm_safe_upgrade install -m virtualbox -v
> 1.4.0-0.svn3059.2mde2007.1
> Running module version sanity check.
>
> Good news! Module version 1.4.0 for vboxdrv.ko.gz
> exactly matches what is already found in kernel 2.6.17-14mdv.
> DKMS will not replace this module.
> You may override by specifying --force.
The RPM %post script didn't specify --force, so this 'install' didn't
complete; you don't actually have the new version installed. But it
goes on:
> + /usr/sbin/dkms --rpm_safe_upgrade remove -m virtualbox -v
> 1.4.0-0.svn3059.1mde2007.1 --all
which succeeds, having now erased the one copy you had installed.
> The intention here is to show this terrible bug, since many times is needed to
> upgrade between releases to apply for example a patch or any other fix.
>
> And as it can be seen the kernel module was removed, but how can that be
> possible when the intention of a dkms install/upgrade is to add/upgrade a
> kernel module in the active kernel tree?
The right solution is to edit the driver RPM %post script to check the
return code of 'dkms install' command. If $? == 101, this means the
install did not succeed because it didn't need to, and --force should
be used; or, don't uninstall.
Thanks,
Matt
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
More information about the DKMS-devel
mailing list