Author: aurel32
Date: 2011-06-11 16:12:56 +0000 (Sat, 11 Jun 2011)
New Revision: 4728

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.preinst
Log:
  * Fix preinst script wrt 3.0 kernel. Patch by Colin Watson.  Closes: 
    #630077.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2011-06-11 16:04:06 UTC (rev 
4727)
+++ glibc-package/trunk/debian/changelog        2011-06-11 16:12:56 UTC (rev 
4728)
@@ -2,8 +2,10 @@
 
   * Update paths to the memcpy wrapper in NEWS.Debian.gz.  Closes: 
     #630138.
+  * Fix preinst script wrt 3.0 kernel. Patch by Colin Watson.  Closes: 
+    #630077.
 
- -- Aurelien Jarno <[email protected]>  Sat, 11 Jun 2011 18:03:15 +0200
+ -- Aurelien Jarno <[email protected]>  Sat, 11 Jun 2011 18:11:51 +0200
 
 eglibc (2.13-6) unstable; urgency=low
 

Modified: glibc-package/trunk/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.preinst        2011-06-11 
16:04:06 UTC (rev 4727)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst        2011-06-11 
16:12:56 UTC (rev 4728)
@@ -25,8 +25,8 @@
 }
 
 linux_compare_versions () {
-    verA=$(($(echo "$1" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 
10000 + \2 \* 100 + \3/')))
-    verB=$(($(echo "$3" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 
10000 + \2 \* 100 + \3/')))
+    verA=$(($(echo "$1" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; 
s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
+    verB=$(($(echo "$3" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; 
s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
 
     test $verA -$2 $verB
 }
@@ -281,7 +281,7 @@
   then
       # Test to make sure z < 255, in x.y.z-n form of kernel version
       # Also make sure we don't trip on x.y.zFOO-n form
-      kernel_rev=$(uname -r | sed 's/\([0-9]*\.[0-9]*\.\)\([0-9]*\)\(.*\)/\2/')
+      kernel_rev=$(uname -r | sed 's/\([0-9]*\.\)\{1,2\}\([0-9]*\)\(.*\)/\2/')
       if [ "$kernel_rev" -ge 255 ]
       then
           echo "WARNING: Your kernel version indicates a revision number"


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to