Package: dkms
Version: 2.2.0.3-1.2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu trusty ubuntu-patch

Dear Maintainer,

The following bug in Ubuntu gives detail about this issue:
https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/1261116

Essentially the 'have_one_kernel' function in the dkms script doesn't
evaluate
to the correct return value when it succeeds.

This patch fixes the issue which is backported here:
  * [eea7213f] add missing patch that fixes have_one_kernel for non-zero
    return code

Thanks for considering the patch.

-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise')
Architecture: amd64 (x86_64)

Kernel: Linux 3.8.0-35-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

diff -Nru dkms-2.2.0.3/debian/changelog dkms-2.2.0.3/debian/changelog
diff -Nru dkms-2.2.0.3/debian/patches/fix_have_one_kernel_for_non-zero_return_code.diff dkms-2.2.0.3/debian/patches/fix_have_one_kernel_for_non-zero_return_code.diff
--- dkms-2.2.0.3/debian/patches/fix_have_one_kernel_for_non-zero_return_code.diff	1969-12-31 18:00:00.000000000 -0600
+++ dkms-2.2.0.3/debian/patches/fix_have_one_kernel_for_non-zero_return_code.diff	2014-01-13 09:24:33.000000000 -0600
@@ -0,0 +1,29 @@
+Description: Fixes function have_one_kernel in dkms script for non-zero return code
+Author: Mario Limonciello <mario_limoncie...@dell.com>
+Origin: upstream, http://linux.dell.com/cgi-bin/cgit.cgi/dkms.git/commit/?id=eea7213f
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1261116
+
+Index: dkms/dkms
+===================================================================
+--- dkms.orig/dkms	2014-01-10 16:33:48.000168000 +0100
++++ dkms/dkms	2014-01-10 16:44:48.522601051 +0100
+@@ -162,11 +162,14 @@
+ 
+ # A little test function for DKMS commands that only work on one kernel.
+ have_one_kernel() {
+-    (( ${#kernelver[@]} > 1 )) && \
+-	die 4 $"The action $1 does not support multiple kernel version" \
+-	$"parameters on the command line."
+-    [[ $all ]] && die 5 $"The action $1 does not support the --all" \
+-	$"parameter."
++    if (( ${#kernelver[@]} != 1 )); then
++        die 4 $"The action $1 does not support multiple kernel version" \
++        $"parameters on the command line."
++    fi
++    if [[ $all ]]; then
++        die 5 $"The action $1 does not support the --all" \
++        $"parameter."
++    fi
+ }
+ 
+ # Set up the kernelver and arch arrays.  You must have a 1:1 correspondence --
diff -Nru dkms-2.2.0.3/debian/patches/series dkms-2.2.0.3/debian/patches/series
--- dkms-2.2.0.3/debian/patches/series	2012-10-05 22:52:13.000000000 -0500
+++ dkms-2.2.0.3/debian/patches/series	2014-01-13 09:24:44.000000000 -0600
@@ -1,3 +1,4 @@
 666023.patch
 657145.patch
 688904.patch
+fix_have_one_kernel_for_non-zero_return_code.diff

Reply via email to