Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 4517a4eeb0c1990431fcb979afe11c89 > files > 12

dkms-2.2.0.3-20.fc18.src.rpm

From: Darik Horn <dajhorn@vanadac.com>
Date: Fri, 28 Dec 2012 11:04:07 -0600
Subject: Use STRIP[0] as the default for the STRIP array.

If STRIP[0]='no' is set for the first module in a dkms.conf file,
then all other modules are usually built the same way. Producing
stripped and unstripped modules in the same build is rarely useful.

Thus, if STRIP[0] is explicitly set, then use it as the default
value for all other unset entries in the STRIP array.
---
 dkms | 3 ++-
 dkms.8 | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/dkms b/dkms
index 9355f4e..fdc9d77 100644
--- dkms.old/dkms	2013-11-06 10:28:00.121215472 +0100
+++ dkms/dkms	2013-11-06 10:28:07.809051459 +0100
@@ -526,7 +526,8 @@
 	esac
 	case ${STRIP[$index]} in
 	    [nN]*) strip[$index]="no";;
-	    *)     strip[$index]="yes";;
+	    [yY]*) strip[$index]="yes";;
+	    '')    strip[$index]=${strip[0]:-yes};;
 	esac
 
 	# If unset, set by defaults
diff -Naur dkms.old/dkms.8 dkms/dkms.8
--- dkms.old/dkms.8	2013-11-06 10:27:36.761713734 +0100
+++ dkms/dkms.8	2013-11-06 10:28:07.809051459 +0100
@@ -765,6 +765,7 @@
 .B STRIP[#]=
 By default strip is considered to be "yes".  If set to "no", DKMS will not
 run strip \-g against your built module to remove debug symbols from it.
+STRIP[0] is used as the default for any unset entries in the STRIP array.
 .TP
 .B PACKAGE_NAME=
 This directive is used to give the name associated with the entire package of modules.  This is the same