Bug#304841: patch

Jason Thomas Jason Thomas <jason@debian.org>, 304841@bugs.debian.org
Tue, 19 Apr 2005 09:36:48 +1000


--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

tags 304841 patch
thanks

heres a patch for this.

-- 
Jason

"I hope you learn speaking English proper I hope speak I me you."
     -- Branden Robinson, 2001

--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="update-grub-sort-order.patch"

diff -Naur grub-0.95+cvs20040624.orig/debian/update-grub grub-0.95+cvs20040624/debian/update-grub
--- grub-0.95+cvs20040624.orig/debian/update-grub	2005-04-19 09:33:04.000000000 +1000
+++ grub-0.95+cvs20040624/debian/update-grub	2005-04-19 09:35:26.000000000 +1000
@@ -427,21 +427,6 @@
 	v1=$(echo $1 | sed -e 's![-\.]\+! !g' -e 's![\.\-]!!g')
 	v2=$(echo $2 | sed -e 's![-\.]\+! !g' -e 's![\.\-]!!g')
 
-	if echo $v1 | grep -q "smp"; then 
-		v1smp=1
-	else 
-		v1smp=0 
-	fi
-
-	if echo $v2 | grep -q "smp"; then
-		v2smp=1
-	else 
-		v2smp=0
-	fi
-
-	v1words=$(echo $v1 | wc -w)
-	v2words=$(echo $v2 | wc -w)
-
 	# we weight different kernel suffixes here
 	# ac   = 50
 	# pre  = -50
@@ -452,15 +437,6 @@
 
 	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.
-
-	if ( [ ! $v1words -eq 6 ] && [ $v1smp -eq 0 ] ) || ( [ ! $v1words -eq 7 ] && [ $v1smp -eq 1 ] ); then 
-		v1=$(echo $v1| cut -d" " -f1-4)" 0 "$(echo $v1| cut -d" " -f5-)
-	fi
-	if ( [ ! $v2words -eq 6 ] && [ $v2smp -eq 0 ] ) || ( [ ! $v2words -eq 7 ] && [ $v2smp -eq 1 ] ); then 
-		v2=$(echo $v2| cut -d" " -f1-4)" 0 "$(echo $v2| cut -d" " -f5-)
-	fi
-
 	result=0; v1finished=0; v2finished=0;
 	while [ $result -eq 0 ] && [ $v1finished -eq 0 ] && [ $v2finished -eq 0 ];
 	do

--7AUc2qLy4jB3hD7Z--