Comment 15 for bug 125816

Revision history for this message
Matt Domsch (matt-domsch) wrote :

you can install http://linux.dell.com/dkms/debian/dkms_2.0.17-1_all.deb which will demonstrate the problem on kernels produced by the older kernel-package, upgrade the kernel to one built with the newer kernel-package (with the above patch applied) and see that it no longer demonstrates the problem.

The demonstrated problem is that when installing a kernel built with the broken kernel-package, DKMS is invoked twice - once by post_hook and once by /etc/kernel/postinst.d/dkms; but update-grub is _never_ called from postinst_hook (because postinst_hook was overwritten with the value from header_postinst_hook, namely invoking dkms). DKMS should only be invoked once (from /etc/kernel/postinst.d/dkms) and update-grub should be invoked from postinst_hook.

I'm working on packaging newer copies of DKMS, but am torn; should it try to use header_postinst_hook at all? If it does, then it's subject to this breakage. If it does not, then there's a chance that the ordering of dpkg installs of new linux-image and linux-headers packages will cause the dkms_autoinstaller to fail. I need the dkms_autoinstaller to be run after both linux-image and linux-headers are installed. To guarantee this, I've been hooking both of those package's postinst hooks, so regardless of install order dkms_autoinstaller is run after they're both installed.

I'm open to advice on this point.