Bug#224441: Weighting of kernel suffixes does not work

menorqui@pirispons.net, 224441@bugs.debian.org menorqui@pirispons.net, 224441@bugs.debian.org
Fri, 9 Jan 2004 13:49:12 +0100


Please, apply following patch. It also includes correctly (I hope so)
weighting of -test suffix.

Patch is against 0.93+cvs20031021-8 version of grub package.

---8<---
--- update-grub.0.93+cvs20031021-8	2004-01-06 22:08:06.000000000 +0100
+++ update-grub	2004-01-09 13:42:31.000000000 +0100
@@ -387,13 +387,14 @@
 	v2words=$(echo $v2 | wc -w)
 
 	# we weight different kernel suffixes here
-	# ac  = 50
-	# pre = -50
-	# rc  = -40
+	# ac   = 50
+	# pre  = -50
+	# rc   = -40
+	# test = -60
 	# others are given 99
-	v1=$(echo $v1 | sed -e 's! k7 ! 786 !g' -e 's! ac ! 50 !g' -e 's! rc ! -40 !g' -e 's! pre ! -50 !g' -e 's![^-0-9 ]\+!99!g')
+	v1=$(echo $v1 | sed -e 's! k7! 786!g' -e 's! ac! 50!g' -e 's! test! -60!g' -e 's! rc! -40!g' -e 's! pre! -50!g' -e 's![^-0-9 ]\+!99!g')
 
-	v2=$(echo $v2 | sed -e 's! k7 ! 786 !g' -e 's! ac ! 50 !g' -e 's! rc ! -40 !g' -e 's! pre ! -50 !g' -e 's![^-0-9 ]\+!99!g')
+	v2=$(echo $v2 | sed -e 's! k7! 786!g' -e 's! ac! 50!g' -e 's! test! -60!g' -e 's! rc! -40!g' -e 's! pre! -50!g' -e 's![^-0-9 ]\+!99!g')
 
 	# this code only works if you stay only with kernel-image kernels.
 
--->8---

Thanks

-- 
Kiko