[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r4729 - in glibc-package/branches/glibc-branch-squeeze/debian: . debhelper.in



Author: aurel32
Date: 2011-06-11 16:13:00 +0000 (Sat, 11 Jun 2011)
New Revision: 4729

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



Modified: glibc-package/branches/glibc-branch-squeeze/debian/changelog
===================================================================
--- glibc-package/branches/glibc-branch-squeeze/debian/changelog	2011-06-11 16:12:56 UTC (rev 4728)
+++ glibc-package/branches/glibc-branch-squeeze/debian/changelog	2011-06-11 16:13:00 UTC (rev 4729)
@@ -6,8 +6,10 @@
     fnmatch() (CVE-2011-1659).  Closes: #626370.
   * Update patches/kfreebsd/local-sysdeps.diff to fix a crash in
     if_nameindex() with more than 3 interfaces on GNU/kFreeBSD.
+  * Fix preinst script wrt 3.0 kernel. Patch by Colin Watson.  Closes: 
+    #630077.
 
- -- Aurelien Jarno <aurel32@debian.org>  Mon, 02 May 2011 06:32:12 +0200
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 11 Jun 2011 18:12:35 +0200
 
 eglibc (2.11.2-10) unstable; urgency=low
 

Modified: glibc-package/branches/glibc-branch-squeeze/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/branches/glibc-branch-squeeze/debian/debhelper.in/libc.preinst	2011-06-11 16:12:56 UTC (rev 4728)
+++ glibc-package/branches/glibc-branch-squeeze/debian/debhelper.in/libc.preinst	2011-06-11 16:13:00 UTC (rev 4729)
@@ -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
 }
@@ -268,7 +268,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"


Reply to: