FS#31180 - [dkms] fails to clean build area until it is removed and reinstalled

Attached to Project: Community Packages
Opened by John (graysky) - Saturday, 18 August 2012, 00:05 GMT
Last edited by Sébastien Luttringer (seblu) - Sunday, 26 August 2012, 11:38 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Low
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: DKMS fails to clean the build area after a kernel is updated unless the user manually removes DKMS. The result is building modules that cannot be used with the newer kernel.

Example error when trying to use a module under these conditions: ERROR: could not insert 'vboxdrv': Exec format error

Additional info:
* package version(s) 2.2.0.3-11

Steps to reproduce:
1) Install a custom kernel and initialize dkms to build some modules. I used virtualbox-source for example.
1a) sudo dkms install vboxhost/4.1.18
2) Update the custom kernel to a newer version and reboot into it. Uninstall the old modules and rebuild them with dkms. You will find that they do not work.
2a) sudo dkms uninstall vboxhost/4.1.18
2b) sudo dkms install vboxhost/4.1.18

--- See output attached called "stale_rebuild"

3) Uninstall dkms and reinstall it. Repeat step 2b

-- See output attached called "fresh_rebuild"

Note the difference is that after a fresh install of dkms, it cleans the build area when it is freshly installed. Here is the diff of those two files:

$ diff fresh_rebuild stale_rebuild
3,12d2
< Kernel preparation unnecessary for this kernel. Skipping...
<
< Building module:
< cleaning build area....
< make KERNELRELEASE=3.5.2-1-ck -C /usr/lib/modules/3.5.2-1-ck/build M=/var/lib/dkms/vboxhost/4.1.18/build........
< cleaning build area....
<
< DKMS: build completed.
<
< vboxdrv.ko:

This task depends upon

Closed by  Sébastien Luttringer (seblu)
Sunday, 26 August 2012, 11:38 GMT
Reason for closing:  Upstream
Comment by Sébastien Luttringer (seblu) - Wednesday, 22 August 2012, 18:44 GMT
I know this sucks but it's how dkms works. You should report this on the upstream ML.

Loading...