Re: media dir

From: Nick Holloway (Nick.Holloway@alfie.demon.co.uk)
Date: Sat Aug 26 2000 - 04:16:06 EST


mec@shout.net (Michael Elizabeth Chastain) writes:
> You need to give the "-p1" option to patch. It looks like you forgot
> to do that.

I was going to use this as an opportunity to plug "patch-kernel", but I
forgot that the late development kernels are always thrown off by Linus'
bizarre numbering schemes.

Here is a patch that I am using to patch the kernels, which does
understand the current naming scheme.

As usual, it is not intended to be rolled into the released kernel,
as Linux tends not to break the numbering scheme when it becomes a
stable branch. However, others may find this useful.

--- /usr/src/linux-2.4/scripts/patch-kernel Mon Dec 13 06:55:54 1999
+++ patch-kernel Sun Jul 16 14:35:14 2000
@@ -26,20 +26,38 @@
 patchdir=${2-.}
 stopvers=${3-imnotaversion}
 
-# set current VERSION, PATCHLEVEL, SUBLEVEL
-eval `sed -n 's/^\([A-Z]*\) = \([0-9]*\)$/\1=\2/p' $sourcedir/Makefile`
+# set current VERSION, PATCHLEVEL, SUBLEVEL and EXTRAVERSION (if applicable)
+EXTRAVERSION=
+eval `sed -n 's/^\([A-Z]*\) = \([0-9a-zA-Z-]*\)$/\1=\2/p' $sourcedir/Makefile`
 if [ -z "$VERSION" -o -z "$PATCHLEVEL" -o -z "$SUBLEVEL" ]
 then
     echo "unable to determine current kernel version" >&2
     exit 1
 fi
 
-echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL"
+echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
 
 while :
 do
- SUBLEVEL=`expr $SUBLEVEL + 1`
- FULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL"
+ case "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" in
+ 2.3.51)
+ VERSION=2 PATCHLEVEL=3 SUBLEVEL=99 EXTRAVERSION=-pre0
+ ;;
+ 2.3.99-pre9)
+ VERSION=2 PATCHLEVEL=4 SUBLEVEL=0 EXTRAVERSION=-test1
+ ;;
+ *-pre*)
+ EXTRAVERSION=-pre`expr $EXTRAVERSION : '-pre\([0-9]*\)' + 1`
+ ;;
+ *-test*)
+ EXTRAVERSION=-test`expr $EXTRAVERSION : '-test\([0-9]*\)' + 1`
+ ;;
+ *)
+ SUBLEVEL=`expr $SUBLEVEL + 1`
+ ;;
+ esac
+
+ FULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
 
     patch=patch-$FULLVERSION
     if [ -r $patchdir/${patch}.gz ]; then

-- 
 `O O'  | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:17 EST