/etc/kernel/header_postinst.d/dkms exited with return code 2

Bug #613407 reported by pasadrul
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Fix Released

Bug Description

Binary package hint: dkms

Ubuntu: 10.04.01 / 2.6.32-24-generic
Package: dkms
  Installé :
  Candidat :
 Table de version :
 *** 0
        500 http://fr.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

In the script /usr/lib/dkms/dkms_autoinstaller the configuration file /etc/dkms/framework.conf is sourced without checking if it exists.
This leads to errors like
   run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 2
when installing kernel packages with this file missing.
One would expect the missing file to be silently ignored, or a more explicit error message to be generated.

  mv /etc/dkms/framework.conf /etc/dkms/framework.conf.bck
  dpkg-reconfigure linux-headers-`uname -r`
will generate a quite obscure error:
  run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 2

== FIX ==
See attached patch which tests existence of the configuration file before sourcing it. Since the file seems to be used to potentially override default values, we silently ignore it when missing.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: dkms
ProcVersionSignature: Ubuntu 2.6.32-24.38-generic
Uname: Linux 2.6.32-24-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Wed Aug 4 12:53:55 2010
PackageArchitecture: all
 PATH=(custom, user)
SourcePackage: dkms

Related branches

Revision history for this message
pasadrul (pasadrul) wrote :
Revision history for this message
pasadrul (pasadrul) wrote :

Looks like this is the same problem in bug #612309 since /etc/kernel/postinst.d/dkms is actually a wrapper for /usr/lib/dkms/dkms_autoinstaller. Marking #612309 as a duplicate.

tags: added: patch
Revision history for this message
Philip Muškovac (yofel) wrote :

Fixed in debian.

tags: added: patch-accepted-debian
removed: patch
Changed in dkms (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms -

dkms ( natty; urgency=low

  * Merge from Debian unstable, remaining changes:
    - debian/control:
      - depend on patch instead of recommending it, if its missing
        the "patches" feature of dkms will no longer work and that
        will cause build failures (LP: #653899)
    - debian/patches/improve-the-logic-behind-kernels-detection.patch:
      - Before using the current kernel we need to make sure that this
        kernel doesn't belong to the host of a chroot and we should
        also be more careful when adding kernels to the candidates
        list (LP: #602408).

dkms ( unstable; urgency=low

  * [bd3b35d] Set DISTRIB_ID=Debian in case lsb_release is missing
  * [2465627] Removed lsb-release from Pre-Depends
  * [1732998] Do not use lsb_release to determine the distribution, add
    a static assignment (Closes: #547353)
  * [d00ff09] Do not return error if /etc/dkms/framework.conf is missing
    (LP: #613407) - thanks to pasadrul
  * [618efc8] Copy from the right directory with mkdsc and copy
    source.changes when building with mkdsc (LP: #611652) - thanks to
    David Henningsson
  * [f23d6b0] Bump to standards-version 3.9.1, no changes needed

dkms ( unstable; urgency=low

  * [f649aa1] Added coreutils >= 7.4 in Depends (Closes: #586356)
  * [01c7c14] Remove old modules when removing a kernel (Closes: #586724)
    - thanks to Jan Muszynski
  * [b6182ba] Bump to Standards-Version 3.9.0, no changes needed
  * [eaeddb3] dkms_common.postinst: handle dkms build error gracefully
    by skipping build for the non matching kernels. (Closes: #588585) -
    thanks to Jan-Marek Glogowski
  * [73533c2] Promote lsb-release to Pre-Depends (Closes: #589308)
 -- Benjamin Drung <email address hidden> Mon, 25 Oct 2010 01:32:41 +0200

Changed in dkms (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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