Control: tag -1 fixed-upstream

On Sun, 05 May 2013 11:27:44 -0500 Philip Miller <unmobile+debb...@gmail.com> wrote:
Package: dkms
Version: 2.1.1.2-2ubuntu1

When I'm uninstalling a package containing and older kernel version, the prerm
scripts appropriately call DKMS to uninstall all of the modules built for that
kernel version. While doing so, DKMS takes the time to run depmod after
uninstalling (each?) module. This work is wasted, since the kernel for which

I've changed that to only do a single depmod run after all modules have been uninstalled for that kernel. I won't take out the last one in order not to leave the system with an invalid modules.dep state when exiting dkms.

If depmod should be avoided completely, this should be done on the kernel side. Some prerm hook script pair should create/remove a flag file that turns any subsequent depmod on this kernel into a no-op while the file exists.
(Feel free to file a wishlist bug against src:linux for this.)

I won't do the same (single depmod at the end) for autoinstall, since if depmod fails, currently the failing module will be removed again and autoinstall continues with the next one, finishing with a valid modules.dep at the end.

the depmod-generated information applies is going away. My suggestions are one
of the following:

* Add a flag to `dkms uninstall' to disable depmod execution so it can be
  avoided when it's pointless.

* Add a new sub-command or a new mode for remove or uninstall that takes a
  kernel version and obliterates all version of all of modules built and
  installed for that kernel version. That would simplify the
  /etc/kernel/prerm.d/dkms script to just be able to call `dkms uninstall -k
  $inst_kern'.

there is now
  dkms kernel_prerm -k $KVER
doing the cleanup loop inside dkms, so it's possible to postpone depmod within a single dkms run
(and matching kernel_postinst which just calls autoinstall)

Andreas

Reply via email to