bugfix for scripts/patch-kernel in 2.6 sublevel stepping
Hi,
scripts/patch-kernel script can't patch a tree, say, from 2.6.25 to 2.6.26.1, because of a wrong comparison in context of patching 2.6.x base. Following patch has a fix for it.
Erkki
scripts/patch-kernel 2008-08-03 23:34:00.000000000 +0300 renamed from scripts/patch-kernel 2008-04-27 19:49:14.000000000 +0300 +2 -1
@@ -213,6 +213,7 @@ if [ $stopvers != "default" ]; then STOPSUBLEVEL=`echo $stopvers | cut -d. -f3` STOPEXTRA=`echo $stopvers | cut -d. -f4` + STOPFULLVERSION=${stopvers%%.$STOPEXTRA} #echo "#___STOPSUBLEVEL=/$STOPSUBLEVEL/, STOPEXTRA=/$STOPEXTRA/" else STOPSUBLEVEL=9999
@@ -249,7 +250,7 @@ do CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" EXTRAVER= - if [ $stopvers = $CURRENTFULLVERSION ]; then + if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then echo "Stopping at $CURRENTFULLVERSION base as requested." break fi
Randy.Dunlap
Acked-by Randy DunlapQuoted 5 lines · Erkki Lintunen
scripts/patch-kernelscript can't patch a tree, say, from 2.6.25 to 2.6.26.1, because of a wrong comparison in context of patching 2.6.x base. Following patch has a fix for it.Erkki
Hi,
This does work better than the current script in the kernel tree.
The larger question: is does anyone still use this script?
Acked-by Randy Dunlap <[email protected]>
Andrew, please merge.
Quoted 19 lines
scripts/patch-kernel 2008-08-03 23:34:00.000000000 +0300 renamed from scripts/patch-kernel 2008-04-27 19:49:14.000000000 +0300 +2
-1@@ -213,6 +213,7 @@ if [ $stopvers != "default" ]; then STOPSUBLEVEL=`echo $stopvers | cut -d. -f3` STOPEXTRA=`echo $stopvers | cut -d. -f4` + STOPFULLVERSION=${stopvers%%.$STOPEXTRA} #echo "#___STOPSUBLEVEL=/$STOPSUBLEVEL/, STOPEXTRA=/$STOPEXTRA/" else STOPSUBLEVEL=9999@@ -249,7 +250,7 @@ do CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" EXTRAVER= - if [ $stopvers = $CURRENTFULLVERSION ]; then + if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then echo "Stopping at $CURRENTFULLVERSION base as requested." break fi
Signature · 1 line
~Randy