dkms removes kernel module when installing/upgrading
Matt Domsch
Matt_Domsch at dell.com
Wed Jun 6 22:02:55 CDT 2007
On Wed, Jun 06, 2007 at 10:20:51PM +0100, Z? wrote:
> > 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.
> Im really not understanding very well, but shouldnt be needed to use --force,
> dkms should check on the kernel module and if already exists, should
> uninstall the previous dkms package and dont remove the vboxdrv drive from
> kernel tree since this is an upgrade and not an uninstall.
OK, this might be considered a fault of DKMS; it should notice the
--rpm_safe_upgrade flag to the 'dkms install' command and
automatically do what --force does; let the new version install
anyway. I'll think about this some more.
> Also if in %preun
> i add:
> if [ "$1" -eq "0" ]
>
> it will not remove the old dkms package, so you start having severall folders
> inside /var/lib/dkms/virtualbox and that should never happen.
Well, yes, you should. One folder for each version that you did a
'dkms add -m module -v version'.
And right, you don't want it to remove the old package, because the
new package failed to install because the old package and the new
package drivers are *exactly the same*.
In general, you don't want to Upgrade (rpm -Uvh) dkms driver
packages. You want to Install (rpm -ivh) them. Like with kernels,
you install a new kernel and if so desired, you remove the old kernel
separately. You don't upgrade kernels. These are kernel drivers,
same principle applies. The RPMs are designed such that they each use
a different directory to install into, so there's no file conflicts
having more than one on a system at a time.
> But i think if we could chat online it could have a bet understanding, do you
> use icq, jabber or other instant messenger?
You can try #fwupdate on irc.freenode.net. I'm often in there.
--
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