dkms removes kernel module when installing/upgrading
Zé
mmodem00 at gmail.com
Wed Jun 6 22:40:50 CDT 2007
Em Quinta, 7 de Junho de 2007, Matt Domsch escreveu:
> 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*.
No, i want it to remove the old package and the corresponding version-release
subdir inside /var/lib/dkms/virtualbox, so you dont start having, ie:
1.3.99-1mde2007.1
1.3.99-2mde2007.1
1.4.0-1mde2007.1
and just have the subdir of the corresponding version-release installed
package, ie:
1.4.0-1mde2007.1
> 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.
So in here i totally disagree since in general with dkms-foo packages also use
to exist foo and foo-devel packages, and also many times foo requires
dkms-foo, so dkms should handle rpm -Uvh since this cant be compared as the
kernel install since there kernel doesnt require any other kernel-foo
package, but even if kernel require some kernel-foo package, should never be
compared with the dkms-foo package install.
dkms still have some serious issues to solve, so that in future will not
happen what im reporting since specially with newbiews, they think the kernel
module exist in kernel tree (since they upgraded the dkms-foo package) but
sometimes happens that when upgrading dkms-foo packages removes the kernel
module from the kernel tree ,and that will lead to problems that a newbie
will never be able to detect.
> > 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.
I also use to be in freenode in #MDE, or #mandriva-cooker with nick Ze_M, and
your nick is?
regards,
--
Zé
Linux user #378762
More information about the DKMS-devel
mailing list