Tom
2012-03-12 15:57:46 UTC
Hi,
I'm user of the latest stable version of dkms in Archlinux and I've
noticed two things:
First, I can't uninstall modules. The culprit is the have_one_kernel()
function. Inside that function, there are two tests where if at least
one of them are true, dkms dies with an error message. The problem goes
when those tests are false, which happens when everything for
uninstalling modules is correct.
Since the tests return a non-zero code when everything is correct, the
have_one_kernel function returns a non-zero code too and then dkms fails.
In summary, the uninstall argument comprises:
uninstall) check_root && have_one_kernel && uninstall_module;;
So if have_one_kernel doesn't return 0, it just exits after that and
bash doesn't run the uninstall_module function. The solution is the
have_one_kernel function must return 0 to continue.
Second, everytime I use dkms auto_installer it only installs one module
(sometimes two). I currently have three modules configured to be
installed automatically by dkms and dkms fails because of depmod. The
error message is:
FATAL: renameat(/lib/modules/3.2.9-1-ARCH, modules.dep.tmp,
/lib/modules/3.2.9-1-ARCH, modules.dep): No such file or directory
So debugging I've found dkms runs depmod in a parallel way. Avoiding
this paralellism, dkms autoinstalls all the modules correctly in one pass.
I'm not a linux expert, but I think you should review this part. The
argument used in depmod is -a which stands for "probe all modules", so I
think with just one depmod when all the modules are installed would
suffice, but maybe I'm wrong. But at least, I'm sure it's wrong to run
several depmods at the same time.
So that's it. I've added a patch with my two fixes. Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dkms_two_fixes.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
Url : http://lists.us.dell.com/pipermail/dkms-devel/attachments/20120312/d908cb2b/attachment.bin
I'm user of the latest stable version of dkms in Archlinux and I've
noticed two things:
First, I can't uninstall modules. The culprit is the have_one_kernel()
function. Inside that function, there are two tests where if at least
one of them are true, dkms dies with an error message. The problem goes
when those tests are false, which happens when everything for
uninstalling modules is correct.
Since the tests return a non-zero code when everything is correct, the
have_one_kernel function returns a non-zero code too and then dkms fails.
In summary, the uninstall argument comprises:
uninstall) check_root && have_one_kernel && uninstall_module;;
So if have_one_kernel doesn't return 0, it just exits after that and
bash doesn't run the uninstall_module function. The solution is the
have_one_kernel function must return 0 to continue.
Second, everytime I use dkms auto_installer it only installs one module
(sometimes two). I currently have three modules configured to be
installed automatically by dkms and dkms fails because of depmod. The
error message is:
FATAL: renameat(/lib/modules/3.2.9-1-ARCH, modules.dep.tmp,
/lib/modules/3.2.9-1-ARCH, modules.dep): No such file or directory
So debugging I've found dkms runs depmod in a parallel way. Avoiding
this paralellism, dkms autoinstalls all the modules correctly in one pass.
I'm not a linux expert, but I think you should review this part. The
argument used in depmod is -a which stands for "probe all modules", so I
think with just one depmod when all the modules are installed would
suffice, but maybe I'm wrong. But at least, I'm sure it's wrong to run
several depmods at the same time.
So that's it. I've added a patch with my two fixes. Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dkms_two_fixes.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
Url : http://lists.us.dell.com/pipermail/dkms-devel/attachments/20120312/d908cb2b/attachment.bin