[Pkg-dkms-commits] [SCM] Dynamic Kernel Module Support branch, master, updated. debian/2.1.1.2-5-6-g03dbf70

Giuseppe Iuculano iuculano at debian.org
Sat Mar 12 10:10:02 UTC 2011


The following commit has been merged in the master branch:
commit 46cc01a945a48f5fee4edc1007ebfff8d69b6b67
Author: Giuseppe Iuculano <iuculano at debian.org>
Date:   Sat Mar 12 10:51:13 2011 +0100

    Merge from Ubuntu: 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).
    
    Thanks: Alberto Milone

diff --git a/debian/patches/improve-the-logic-behind-kernels-detection.patch b/debian/patches/improve-the-logic-behind-kernels-detection.patch
new file mode 100644
index 0000000..d54791e
--- /dev/null
+++ b/debian/patches/improve-the-logic-behind-kernels-detection.patch
@@ -0,0 +1,41 @@
+Improve the logic behind kernels detection.
+
+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.
+Index: dkms-2.1.1.2/dkms_common.postinst
+===================================================================
+--- dkms-2.1.1.2.orig/dkms_common.postinst	2010-09-23 18:56:55.119898998 +0200
++++ dkms-2.1.1.2/dkms_common.postinst	2010-09-23 18:58:03.579898998 +0200
+@@ -188,13 +188,26 @@
+ # current kernel.
+ NEWEST_KERNEL=$(get_newest_kernel "$KERNELS")
+ 
+-if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
+-    echo "Building for $CURRENT_KERNEL and $NEWEST_KERNEL"
+-    KERNELS="$KERNELS $NEWEST_KERNEL"
++# If the current kernel doesn't come from the host of a chroot
++if [ `_is_kernel_name_correct $CURRENT_KERNEL` = "yes" ]; then
++    # See if it's worth building the module for both the newest kernel
++    # and for the current kernel
++    if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
++        echo "Building for $CURRENT_KERNEL and $NEWEST_KERNEL"
++        KERNELS="$CURRENT_KERNEL $NEWEST_KERNEL"
++    else
++        echo "Building only for $CURRENT_KERNEL"
++    fi
++# The current kernel is not useful as it's the host's
+ else
+-    echo "Building only for $CURRENT_KERNEL"
+-fi
++    echo "It is likely that $CURRENT_KERNEL belongs to a chroot's host"
+ 
++    # Let's use only the newest kernel
++    if [ -n "$NEWEST_KERNEL" ]; then
++        KERNELS="$NEWEST_KERNEL"
++        echo "Building only for $NEWEST_KERNEL"
++    fi
++fi
+ 
+ if [ -n "$ARCH" ]; then
+     if which lsb_release >/dev/null && [ $(lsb_release -s -i) = "Ubuntu" ]; then
diff --git a/debian/patches/series b/debian/patches/series
index 266a3a6..e28e159 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ framework_conf.patch
 mkdsc.patch
 make-logging-fix.patch
 mkdeb.patch
+improve-the-logic-behind-kernels-detection.patch

-- 
Dynamic Kernel Module Support



More information about the Pkg-dkms-commits mailing list