Bug#224441: Weighting of kernel suffixes does not work

Kiko Piris Kiko Piris <menorqui@pirispons.net>, 224441@bugs.debian.org
Fri, 9 Jan 2004 14:56:02 +0100


On 09/01/2004 at 13:49, menorqui@pirispons.net wrote:

> 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.

Previous was wrong. I guess this one is correct:

---8<---
--- update-grub.0.93+cvs20031021-8	2004-01-06 22:08:06.000000000 +0100
+++ update-grub	2004-01-09 14:52:56.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! rc! -40 !g' -e 's! pre! -50 !g' -e 's! test! -60 !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! rc! -40 !g' -e 's! pre! -50 !g' -e 's! test! -60 !g' -e 's![^-0-9 ]\+!99!g')
 
 	# this code only works if you stay only with kernel-image kernels.
 
--->8---

Thanks again.

-- 
Kiko