The following commit has been merged in the master branch:
commit 734f494028d6947ddc2a60a95f83e9936b0dedd7
Author: Giuseppe Iuculano <[email protected]>
Date:   Sun May 3 11:14:12 2009 +0200

    Rewrited debian/postinst, now it is more readable

diff --git a/debian/postinst b/debian/postinst
index 63f498c..b595b89 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -3,17 +3,18 @@
 set -e
 
 if [ "$1" = upgrade ]; then
-       if dpkg --compare-versions "$2" lt-nl "2.0.21.1-1" ; then
+       if dpkg --compare-versions "$2" lt-nl "2.0.21.1-1~" ; then
                if [ -e "/etc/modprobe.d/dkms" ]; then
-                       if [ "`md5sum \"/etc/modprobe.d/dkms\" | sed -e \"s/ 
.*//\"`" = \
-                               "`dpkg-query -W -f='${Conffiles}' dkms | sed -n 
-e \"\\\\' /etc/modprobe.d/dkms's/.* //p\"`" ]
-                       then
-                               rm -f "/etc/modprobe.d/dkms"
+                       md5sum=$(md5sum /etc/modprobe.d/dkms | sed -e 's/ .*//')
+                       old_md5sum=$(dpkg-query -W -f='${Conffiles}' dkms | \
+                               sed -n -e "\' /etc/modprobe.d/dkms ' { s/ 
obsolete$//; s/.* //; p }")
+                       if [ "$md5sum" = "$old_md5sum" ]; then
+                               rm -f /etc/modprobe.d/dkms
+                       else
+                               echo "Moving /etc/modprobe.d/dkms to 
/etc/modprobe.d/dkms.conf"
+                               grep -v '^#' /etc/modprobe.d/dkms >> 
/etc/modprobe.d/dkms.conf
+                               rm -f /etc/modprobe.d/dkms
                        fi
-               else
-                       echo "Moving /etc/modprobe.d/dkms to 
/etc/modprobe.d/dkms.conf"
-                       grep -v '^#' /etc/modprobe.d/dkms >> 
/etc/modprobe.d/dkms.conf
-                       rm -f "/etc/modprobe.d/dkms"
                fi
        fi
 fi

-- 
Maintainance of the dkms package

_______________________________________________
Pkg-dkms-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-dkms-commits

Reply via email to