[Pkg-dkms-commits] [SCM] Dynamic Kernel Module Support branch, master, updated. debian/2.1.1.2-3-4-geaeddb3

Giuseppe Iuculano iuculano at debian.org
Sat Jul 17 11:08:01 UTC 2010


The following commit has been merged in the master branch:
commit eaeddb3c2cc13821fc0078029591bfb05f7eaa79
Author: Giuseppe Iuculano <iuculano at debian.org>
Date:   Sat Jul 17 13:06:18 2010 +0200

    dkms_common.postinst: handle dkms build error gracefully by skipping build for the non matching kernels.
    
    Closes: #588585
    Thanks: Jan-Marek Glogowski
    
    dkms.conf allows to set a BUILD_EXCLUSIVE_KERNEL / BUILD_EXCLUSIVE_ARCH
    parameter to specify a regular expression which defines the subset of
    kernels / architectures which DKMS is allowed to build the module for. If
    the kernel being built for does not match against this regular
    expressions, the dkms build will error out with exit code 9.
    
    This patch changes dkms_common.postinst to handle this dkms build
    error gracefully by skipping build for the non matching kernels.

diff --git a/debian/patches/series b/debian/patches/series
index 937a3df..02656bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ fix-bashism.patch
 manpage-update.patch
 use-system-tmpdir.patch
 remove-old-mod.patch
+skip-non-matching-kernel.patch
diff --git a/debian/patches/skip-non-matching-kernel.patch b/debian/patches/skip-non-matching-kernel.patch
new file mode 100644
index 0000000..c9cb544
--- /dev/null
+++ b/debian/patches/skip-non-matching-kernel.patch
@@ -0,0 +1,34 @@
+dkms.conf allows to set a BUILD_EXCLUSIVE_KERNEL / BUILD_EXCLUSIVE_ARCH 
+parameter to specify a regular expression which defines the subset of 
+kernels / architectures which DKMS is allowed to build the module for. If 
+the kernel being built for does not match against this regular 
+expressions, the dkms build will error out with exit code 9.
+
+This patch changes dkms_common.postinst to handle this dkms build 
+error gracefully by skipping build for the non matching kernels.
+--- a/dkms_common.postinst
++++ b/dkms_common.postinst
+@@ -231,8 +231,22 @@ for KERNEL in $KERNELS; do
+         fi
+         if [ -e /lib/modules/$KERNEL/build/include ]; then
+             echo "Building initial module for $KERNEL"
++            set +e
+             dkms build -m $NAME -v $VERSION -k $KERNEL $ARCH > /dev/null
+-            echo "Done."
++            case $? in
++            9)
++                set -e
++                echo "Skipped."
++                continue
++                ;;
++            0)
++                set -e
++                echo "Done."
++                ;;
++            *)
++                exit $?
++                ;;
++            esac
+             dkms_status=`dkms status -m $NAME -v $VERSION -k $KERNEL $ARCH`
+         else
+             echo "Module build for the currently running kernel was skipped since the"

-- 
Dynamic Kernel Module Support



More information about the Pkg-dkms-commits mailing list