Bug#355790: update-grub should split version numbers on number/non-number boundaries

Vince Busam vbusam at google.com
Tue Mar 7 21:58:47 UTC 2006


Package: grub
Version: 0.97-5

update-grub does not properly sort kernels of the form A.B.C.D-xEyF 
(where [A-F] are numbers, and x & y are letters), rather they have to be 
named A.B.C.D-xE-yF.  This patch fixes that case by replacing a useless 
sed expression with one to put a space on these boundaries.

--- update-grub.orig    2006-03-07 13:47:54.000000000 -0800
+++ update-grub 2006-03-07 13:50:33.000000000 -0800
@@ -465,8 +465,8 @@
          v2=$(echo $v2 | sed -e 's!^\(.*-\([0-9]\+\.\)\{2\}[0-9]\+\)\( 
.*\)!\1.0 \3!g')

         # Then split the version number and remove any '.' 's or dashes
-       v1=$(echo $v1 | sed -e 's![-\.]\+! !g' -e 's![\.\-]!!g')
-       v2=$(echo $v2 | sed -e 's![-\.]\+! !g' -e 's![\.\-]!!g')
+       v1=$(echo $v1 | sed -e 's![-\.]\+! !g' -e 
's!\([0-9]\)\([A-Za-z]\)!\1 \2!')
+       v2=$(echo $v2 | sed -e 's![-\.]\+! !g' -e 
's!\([0-9]\)\([A-Za-z]\)!\1 \2!')

         # we weight different kernel suffixes here
         # ac   = 50




More information about the Pkg-grub-devel mailing list