Marco d'Itri wrote: > update-modules needs to be called only when /etc/modutils/ is modified, > so dh_installmodules should not add code to call it in other situations > (specifically when /etc/modprobe.d/ is modified or when new modules are > installed).
dh_installmodules generates code to run update-modules in the postinst and postrm, which are run when modules are installed or removed. Amoung other things, the depmod call in update-modules.modutils makes the newly installed modules in the postinst available for immediate use (if the kernel matches). There's no way for a postinst script to know whether installing/upgrading the package has caused new modules to be installed, or upgraded modules to have new dependencies, or removed modules, or made no significant changes. It might be possible to track that, but it would be very complicated and the easiest way to do the right thing in all situations, and be idempotent, is to run update-modules every time. It's not clear to me from your bug report whether you are seeing some actual problem from running update-modules every time, or if you just want to optimise things. The best way to optimise things might be for dh_installmodules to determine if the package has 2.4 or 2.6 modules in it and only add the update-modules calls for 2.4, since IIRC it's a no-op for 2.6. -- see shy jo
signature.asc
Description: Digital signature

