[Pkg-dkms-commits] [SCM] Maintainance of the dkms package branch, master, updated. debian/2.0.21.1-1-18-g6065f7a

Giuseppe Iuculano giuseppe at iuculano.it
Fri Jun 5 20:02:42 UTC 2009


The following commit has been merged in the master branch:
commit 6065f7a6cf1ef33e3194f27814b50065230001b5
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date:   Fri Jun 5 22:02:21 2009 +0200

    Do not move away the old module, by default dkms install the new one in /lib/modules/<kernelversion>/updates/dkms

diff --git a/debian/changelog b/debian/changelog
index 0747e19..80c6d94 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,13 +14,13 @@ dkms (2.0.22.0-1) unstable; urgency=low
   * [3731c00] debian/patches/08-support_kernel-img.conf.patch: Use
     update-initramfs, it is the default in Debian/Ubuntu and it also computes
     and stores some checksums. (Closes: #529038)
-  * [f4a197f] debian/patches/16_dpkg-divert.patch: Use dpkg-divert to
-    override an existing kernel module, thanks to Andrea Mennucci.
-    (Closes: #529059)
+  * [f4a197f] debian/patches/16_dpkg-divert.patch: Do not move away the old
+    module, by default dkms install the new one in
+    /lib/modules/<kernelversion>/updates/dkms (Closes: #529059)
   * [db7ffe7] debian/patches/01_kernel_postinst.patch: shut up "which" in the
     the kernel kernel_postinst.d script, only the exit code is needed.
 
- -- Giuseppe Iuculano <giuseppe at iuculano.it>  Tue, 19 May 2009 23:41:33 +0200
+ -- Giuseppe Iuculano <giuseppe at iuculano.it>  Fri, 05 Jun 2009 22:00:35 +0200
 
 dkms (2.0.21.1-1) unstable; urgency=low
 
diff --git a/debian/patches/16_dpkg-divert.patch b/debian/patches/16_dpkg-divert.patch
index d692cd4..5c6b609 100644
--- a/debian/patches/16_dpkg-divert.patch
+++ b/debian/patches/16_dpkg-divert.patch
@@ -1,7 +1,7 @@
-Use dpkg-divert to override an existing kernel module, thanks to Andrea Mennucci. (Closes: #529059)
+Do not move away the old module, by default dkms install the new one in /lib/modules/<kernelversion>/updates/dkms (Closes: #529059)
 --- a/dkms
 +++ b/dkms
-@@ -1234,11 +1234,13 @@ function install_module()
+@@ -1234,11 +1234,16 @@ function install_module()
  	    local found_orginal=""
  	    for original_module in $archive_pref1 $archive_pref2 $archive_pref3 $archive_pref4; do
  		if [ -f "$original_module" ]; then
@@ -10,43 +10,49 @@ Use dpkg-divert to override an existing kernel module, thanks to Andrea Mennucci
 -		    echo $"   - Archiving for uninstallation purposes"
 -		    mkdir -p "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}"
 -		    mv -f "$original_module" "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/"
-+		    if ! which dpkg-divert >/dev/null 2>&1 ; then
++		    case "$running_distribution" in
++			    Debian* | Ubuntu* ) ;;
++			    *)
 +			    echo $"   - Found $original_module"
 +			    echo $"   - Storing in $dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/"
 +			    echo $"   - Archiving for uninstallation purposes"
 +			    mkdir -p "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}"
 +			    mv -f "$original_module" "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/"
-+		    fi
++			    ;;
++		    esac
  		    found_original="yes"
  		    break
  		fi
-@@ -1258,13 +1260,20 @@ function install_module()
+@@ -1258,13 +1263,23 @@ function install_module()
  	if [ "$module_count" -gt 1 ]; then
  	    echo $" - Multiple same named modules!"
  	    echo $"   - $module_count named ${dest_module_name[$count]}$module_suffix in $lib_tree/"
 -	    echo $"   - All instances of this module will now be stored for reference purposes ONLY"
 -	    echo $"   - Storing in $dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/"
-+	    if ! which dpkg-divert >/dev/null 2>&1 ; then
++	    case "$running_distribution" in
++		    Debian* | Ubuntu* ) ;;
++		    *)
 +		    echo $"   - All instances of this module will now be stored for reference purposes ONLY"
 +		    echo $"   - Storing in $dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/"
-+	    fi
++		    ;;
++	    esac
  	    for module_dup in `find $lib_tree -name ${dest_module_name[$count]}$module_suffix -type f`; do
  		dup_tree=`echo $module_dup | sed "s#^$lib_tree##" | sed "s#${dest_module_name[$count]}$module_suffix##"`
 -		echo $"     - Stored $module_dup"
 -		mkdir -p "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/$dup_tree"
 -		mv -f $module_dup "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/$dup_tree"
-+		if which dpkg-divert >/dev/null 2>&1 ; then
-+			dpkg-divert --add --rename --divert \
-+			"$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/$dup_tree/$module_dup"  $module_dup
-+	        else
++		case "$running_distribution" in
++			Debian* | Ubuntu* ) ;;
++			*)
 +		       echo $"     - Stored $module_dup"
 +		       mkdir -p "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/$dup_tree"
 +		       mv -f $module_dup "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/$dup_tree"
-+	        fi
++		       ;;
++	       esac
  	    done
  	fi
  
-@@ -1605,10 +1614,16 @@ function do_uninstall()
+@@ -1605,10 +1620,16 @@ function do_uninstall()
  	    rm -f "$install_tree/$1${real_dest_module_location}/${dest_module_name[$count]}$module_suffix"
  	    echo $" - Original module"
  	    if [ -e "$dkms_tree/$module/original_module/$1/$2/${dest_module_name[$count]}$module_suffix" ]; then
@@ -54,16 +60,16 @@ Use dpkg-divert to override an existing kernel module, thanks to Andrea Mennucci
 -		echo $"   - Moving it to: $install_tree/$1${DEST_MODULE_LOCATION[$count]}/"
 -		mkdir -p "$install_tree/$1${DEST_MODULE_LOCATION[$count]}/"
 -		mv -f "$dkms_tree/$module/original_module/$1/$2/${dest_module_name[$count]}$module_suffix" "$install_tree/$1${DEST_MODULE_LOCATION[$count]}/" 2>/dev/null
-+		if ! which dpkg-divert >/dev/null 2>&1 ; then
++		case "$running_distribution" in
++			Debian* | Ubuntu* ) ;;
++			*)
 +			echo $"   - Archived original module found in the DKMS tree"
 +			echo $"   - Moving it to: $install_tree/$1${DEST_MODULE_LOCATION[$count]}/"
 +			mkdir -p "$install_tree/$1${DEST_MODULE_LOCATION[$count]}/"
 +			mv -f "$dkms_tree/$module/original_module/$1/$2/${dest_module_name[$count]}$module_suffix" \
 +		       	"$install_tree/$1${DEST_MODULE_LOCATION[$count]}/" 2>/dev/null
-+		else
-+			dpkg-divert --remove --rename --divert "$dkms_tree/$module/original_module/$1/$2/${dest_module_name[$count]}$module_suffix" \
-+		        "$install_tree/$1${DEST_MODULE_LOCATION[$count]}/"
-+		fi
++			;;
++		esac
  	    else
  		echo $"   - No original module was found for this module on this kernel."
  		echo $"   - Use the dkms install command to reinstall any previous module version."

-- 
Maintainance of the dkms package



More information about the Pkg-dkms-commits mailing list