depmod runs multiple times for running kernel, instead of installed kernel versions

Bug #341955 reported by Albert Damen
2
Affects Status Importance Assigned to Milestone
module-init-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: module-init-tools

Upgrading module-init-tools 3.7~pre7-3 within a jaunty chroot on a hardy system failed.
Running /var/lib/dpkg/info/module-init-tools.postinst configure with set +e gives:

Running depmod for 2.6.28-8-generic...
WARNING: Couldn't open directory /lib/modules/2.6.24-23-generic: No such file or directory
FATAL: Could not open /lib/modules/2.6.24-23-generic/modules.dep.temp for writing: No such file or directory
Running depmod for 2.6.28-9-generic...
WARNING: Couldn't open directory /lib/modules/2.6.24-23-generic: No such file or directory
FATAL: Could not open /lib/modules/2.6.24-23-generic/modules.dep.temp for writing: No such file or directory

So depmod is running multiple times for the running hardy kernel, instead of the installed jaunty kernel versions.

Changing module-init-tools.postinst (in run_depmod) :
- /sbin/depmod -a -F "/boot/System.map-$KVER"
+ /sbin/depmod -a -F "/boot/System.map-$KVER" $KVER

solves the problem and cleanly runs depmod for the installed kernel versions:
Running depmod for 2.6.28-8-generic...
Running depmod for 2.6.28-9-generic...

as seems to be intended.

Doing an upgrade in a chroot may seem exceptional, but I think the same issue will happen on a normal jaunty system with multiple kernel versions installed. It will just not throw the errors and fail, but will effectively only run depmod for the running kernel.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package module-init-tools - 3.7~pre7-5

---------------
module-init-tools (3.7~pre7-5) jaunty; urgency=low

  * debian/module-init-tools.postinst: Correct call to depmod to include
    kernel version. LP: #341955.

 -- Scott James Remnant <email address hidden> Fri, 13 Mar 2009 12:04:33 +0000

Changed in module-init-tools:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.