[Pkg-dkms-maint] Bug#653176: ignores --kernelsourcedir

Evgeni Golov evgeni at debian.org
Sat Dec 24 17:52:18 UTC 2011


Package: dkms
Version: 2.2.0.3-1
Severity: normal
Tags: patch

Heya

when you try to build a non-running, non-defaultpath kernel module,
you would supply --kernelsourcedir=/wherever/the/kernel/lies.
Sadly dkms just overwrites the value you set, because _get_kernel_dir()
does not check whether ksourcedir_fromcli is set and defaults to
/lib/modules/$KVER/build.

the below trivial patch fixes it.

Regards and happy xhwatever
Evgeni

patch:
--- dkms-2.2.0.3.orig/dkms
+++ dkms-2.2.0.3/dkms
@@ -47,6 +47,9 @@ _get_kernel_dir() {
        Linux)          DIR="/lib/modules/$KVER/build" ;;
        GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
     esac
+
+    [ ! -z "$ksourcedir_fromcli" ] && DIR=$kernel_source_dir
+
     echo $DIR
 }



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dkms depends on:
ii  build-essential    11.5
ii  coreutils          8.13-3
ii  dpkg-dev           1.16.1.2
ii  gcc                4:4.6.2-2
ii  make               3.81-8.1
ii  module-init-tools  3.16-1
ii  patch              2.6.1-2

Versions of packages dkms recommends:
ii  fakeroot                                      1.18.2-1
ii  linux-headers-2.6.38-2-amd64 [linux-headers]  2.6.38-5
ii  linux-headers-2.6.39-1-amd64 [linux-headers]  2.6.39-1+b1
ii  linux-headers-2.6.39-2-amd64 [linux-headers]  2.6.39-3
ii  linux-headers-3.0.0-1-amd64 [linux-headers]   3.0.0-4
ii  linux-headers-3.0.0-2-amd64 [linux-headers]   3.0.0-6
ii  linux-headers-3.1.0-1-amd64 [linux-headers]   3.1.6-1
ii  linux-headers-amd64 [linux-headers]           3.1+41
ii  linux-image-2.6.38-2-amd64 [linux-image]      2.6.38-5
ii  linux-image-2.6.39-1-amd64 [linux-image]      2.6.39-1+b1
ii  linux-image-2.6.39-2-amd64 [linux-image]      2.6.39-3
ii  linux-image-3.0.0-1-amd64 [linux-image]       3.0.0-4
ii  linux-image-3.0.0-2-amd64 [linux-image]       3.0.0-6
ii  linux-image-3.1.0-1-amd64 [linux-image]       3.1.6-1
ii  menu                                          2.1.46
ii  sudo                                          1.8.3p1-2

dkms suggests no packages.

-- no debconf information





More information about the Pkg-dkms-maint mailing list