When upgrading a linux-header (or linux-image) package without a kernel version change, we should rebuild all modules for that kernel. I'm a bit reluctant to unbuild all modules during preinst, I'd rather "mark" them for rebuilding during the next autoinstall run. Maybe this could be achieved by creating a flag file in the previously built module directory.
All actions that require the module to be built (build, install, autoinstall) should automatically unbuild the module if that flag file exists (which would cause the flag file to be deleted) before carrying out their operation.
I'm not sure whether we should change the status output if a module is in that state.
Ideally this should be implemented directly in dkms to be called from the scripts, e.g.
dkms mark-for-rebuild -k <kernel> [-m/-v module/version]
This should also operate on AUTOINSTALL=no modules.
Which also raises another question: shouldn't kernel_prerm.d_dkms.in act on 'built' modules, too, in addition to 'installed' ones?
When upgrading a linux-header (or linux-image) package without a kernel version change, we should rebuild all modules for that kernel. I'm a bit reluctant to
unbuildall modules during preinst, I'd rather "mark" them for rebuilding during the nextautoinstallrun. Maybe this could be achieved by creating a flag file in the previously built module directory.All actions that require the module to be built (build, install, autoinstall) should automatically
unbuildthe module if that flag file exists (which would cause the flag file to be deleted) before carrying out their operation.I'm not sure whether we should change the
statusoutput if a module is in that state.Ideally this should be implemented directly in dkms to be called from the scripts, e.g.
dkms mark-for-rebuild -k <kernel> [-m/-v module/version]This should also operate on AUTOINSTALL=no modules.
Which also raises another question: shouldn't
kernel_prerm.d_dkms.inact on 'built' modules, too, in addition to 'installed' ones?