[Pkg-dkms-maint] Bug#560822: dkms: please autorebuild modules when new kernel images are installed

Michael Gilbert michael.s.gilbert at gmail.com
Sat Feb 27 06:31:41 UTC 2010

retitle 560822 dkms: modules are not automatically rebuilt for abi bumped kernels in certain cases

ok, so i was looking into this a bit more since i just upgraded from
2.6.32-2 to 2.6.32-3.  playing the part of the average/naive user, i

$ apt-get install linux-image-2.6.32-3-amd64

which upon conclusion did not rebuild my existing dkms modules
(i.e. /lib/modules/2.6.32-3/updates/dkms did not exist). the
dkms_autoinstaller script was indeed run in the kernel's postinst, but
it failed because i had forgotten the headers (note this wouldn't
have been obvious to the average user). so thinking that all i need
now are the headers, i did:

$ apt-get install linux-headers-2.6.32-3-amd64

but my modules still were not built.  so, at that point, i decided to
start over to figure out the right way to bump the kernel.  i removed
those two packages and instead installed the image and headers at the
same time:

$ apt-get install linux-image-2.6.32-3-amd64 linux-headers-2.6.32-3-amd64

and my modules were in fact built.  so, i think the core of the problem
is that there is no check in the kernel's postinst to throw an error if
the headers are missing.  i see two possible automated/user-friendly

1. add the headers as a recommends for all of the kernel-image packages
  - since apt now installs all recommends by default, this will solve
    the problem quite satisfactorily.
  - however, the kernel maintainers may not be very receptive to such an
    intrusive change

2. run dkms_autoinstaller from the linux-headers postinst instead of
the linux-image postinst
   - this partially solves the problem since the modules will actually
     get built as soon as the headers are available.
   - however, this doesn't tell the naive user that they are missing
     something.  a solution to that may be to detect missing headers
     in the linux-image postinst that says "you need to install
     linux-headers-XXXXXX package" in order to bring your kernel
     modules up to date.

anyway, hope this is info is somehow useful.  it should be relatively
straightforward to implement option 2, and i can do that if there is
concurrance/support for it.


More information about the Pkg-dkms-maint mailing list