Bug 221079

Summary: CLEAN trumped if no MAKE* exists in dkms.conf
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: dkmsAssignee: Matt Domsch <matt_domsch>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: tcallawa
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.0.17.5-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-24 07:02:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Honor CLEAN even if MAKE* not set, spelling fixes none

Description Ville Skyttä 2007-01-01 12:56:11 UTC
Specified CLEAN=... in dkms.conf is trumped by built-in defaults if no MAKE*
exists in dkms.conf.

A quick (untested) patch attached, along with some spelling fixes for the man page.

Comment 1 Ville Skyttä 2007-01-01 12:56:11 UTC
Created attachment 144605 [details]
Honor CLEAN even if MAKE* not set, spelling fixes

Comment 2 Matt Domsch 2007-01-02 23:44:03 UTC
You've got to turn the logic around, version test first, then test for
existance of $make_command and $clean and set them if not set.
Otherwise you're still stuck with $clean not set if $make_command
was set.  Something like:

--- dkms-2.0.13.driverdisks     Tue Jan  2 17:15:26 2007
+++ dkms        Tue Jan  2 17:24:59 2007
@@ -431,13 +431,19 @@ function read_conf ()
        index=$(($index+1))
     done

-    # Use the generic make command if no make command has been specified
-    if [ -z "$make_command" ]; then
-       if [[ $(VER $1) < $(VER 2.6.6) ]]; then
+    # Use the generic make and make clean commands if not specified
+    if [[ $(VER $1) < $(VER 2.6.6) ]]; then
+       if [ -z "$make_command" ]; then
            make_command="make -C $kernel_source_dir SUBDIRS=$dkms_tree/
$module/$module_version/build modules"
+       fi
+       if [ -z "$clean" ]; then
            clean="make -C $kernel_source_dir SUBDIRS=$dkms_tree/$module/
$module_version/build clean"
-       else
+       fi
+    else
+       if [ -z "$make_command" ]; then
            make_command="make -C $kernel_source_dir M=$dkms_tree/$module/
$module_version/build"
+       fi
+       if [ -z "$clean" ]; then
            clean="make -C $kernel_source_dir M=$dkms_tree/$module/
$module_version/build clean"
        fi
     fi


I'll take the spelling fixes.  Thanks for the report and the patch!
-Matt



Comment 3 Fedora Update System 2007-09-24 17:59:43 UTC
dkms-2.0.17.4-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2007-10-11 22:53:03 UTC
dkms-2.0.17.5-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dkms'

Comment 5 Fedora Update System 2007-10-24 07:02:08 UTC
dkms-2.0.17.5-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.