* [PATCH] - patch-kernel 2.4.18
@ 2002-06-20 5:54 Christopher A. Baumbauer
[not found] ` <1142957.qPl0MRWbmq@newssend.sf-tec.de>
0 siblings, 1 reply; 2+ messages in thread
From: Christopher A. Baumbauer @ 2002-06-20 5:54 UTC (permalink / raw)
To: linux-kernel
Added support for patching in the pre-release patches (dept. of
redundancy dept.) to the kernel tree. Nothing major, but along the same
lines as the -ac patch option (also works the same way, except for using
-pre instead). Finally, if there is a discussion, could you please cc
me directly since I'm not on the list.
Ciao,
Chris Baumbauer
--- scripts/patch-kernel.orig Thu Jun 20 00:37:30 2002
+++ scripts/patch-kernel Thu Jun 20 00:45:25 2002
@@ -1,6 +1,6 @@
#! /bin/sh
# Script to apply kernel patches.
-# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx
] ] ]
+# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx
] [ -prexx ] ] ]
# The source directory defaults to /usr/src/linux, and the patch
# directory defaults to the current directory.
# e.g.
@@ -41,18 +41,24 @@
# Added -ac option, use -ac or -ac9 (say) to stop at a particular version
# Dave Gilbert <linux@treblig.org>, 29th September 2001.
+# Added -pre option to work similar to the -ac option.
+# Chris Baumbauer <baumbaca@cs.purdue.edu>, 20th June 2002.
+
# Set directories from arguments, or use defaults.
sourcedir=${1-/usr/src/linux}
patchdir=${2-.}
stopvers=${3-imnotaversion}
-# See if we have any -ac options
+# See if we have any -ac or -pre options
for PARM in $*
do
case $PARM in
-ac*)
gotac=$PARM;
-
+ ;;
+ -pre*)
+ gotpre=$PARM;
+ ;;
esac;
done
@@ -188,6 +194,50 @@
}
applyPatch patch-${CURRENTFULLVERSION}${gotac}
fi
+elif [ x$gotpre != x ]; then
+ # Living dangerously with the -pre patches
+ # I know this is a direct rip from the -ac code, but it should be the
same: in theory
+
+ # Lets determine if this is our first -pre patch or if we've
already included some in the past
+ if [ -f $patchdir/patch-${CURRENTFULLVERSION}-pre*\.* ]
+ then
+ PREVERSION=$CURRENTFULLVERSION
+ else
+ PREVERSION=$FULLVERSION
+ fi
+
+ # They could have done -pre (get latest) or -prexx where xx=version
they want
+ if [ $gotpre == "-pre" ]
+ then
+ # They want the latest version
+ HIGHESTPATCH=0
+ for PATCHNAMES in $patchdir/patch-${PREVERSION}-pre*\.*
+ do
+ ACVALUE=`echo $PATCHNAMES | sed -e
's/^.*patch-[0-9.]*-pre\([0-9]*\).*/\1/'`
+ # Check it is actually a recognised patch type
+ findFile $patchdir/patch-${PREVERSION}-pre${ACVALUE} || break
+
+ if [ $ACVALUE -gt $HIGHESTPATCH ]
+ then
+ HIGHESTPATCH=$ACVALUE
+ fi
+ done
+
+ if [ $HIGHESTPATCH -ne 0 ]
+ then
+ findFile $patchdir/patch-${PREVERSION}-pre${HIGHESTPATCH}
|| break
+ applyPatch patch-${PREVERSION}-pre${HIGHESTPATCH}
+ else
+ echo "No pre release patches found"
+ fi
+ else
+ # They want an exact version
+ findFile $patchdir/patch-${PREVERSION}${gotpre} || {
+ echo "Sorry, I couldn't find the $gotpre patch for
$PREVERSION. Hohum."
+ exit 1
+ }
+ applyPatch patch-${PREVERSION}${gotpre}
+ fi
fi
--
-------
Christopher A. Baumbauer
cbaumba1@purdue.edu, cab105@yahoo.com
There are 10 types of people in the world:
Those who understand binary, and those who don't
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] - patch-kernel 2.4.18
[not found] ` <1142957.qPl0MRWbmq@newssend.sf-tec.de>
@ 2002-06-20 15:53 ` Christopher A. Baumbauer
0 siblings, 0 replies; 2+ messages in thread
From: Christopher A. Baumbauer @ 2002-06-20 15:53 UTC (permalink / raw)
To: Rolf Eike Beer; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Grr, it showed up fine before I sent it (fameous last words), but I'll
attempt to resend it.
Thanks,
Chris
Rolf Eike Beer wrote:
>Von Christopher A. Baumbauer:
>
>
>
>>-# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx
>>] ] ]
>>
>>
>
>I don't think that this will work, your mailer did his own line breaks!
>
>Eike
>
>
--
-------
Christopher A. Baumbauer
cbaumba1@purdue.edu, cab105@yahoo.com
There are 10 types of people in the world:
Those who understand binary, and those who don't
[-- Attachment #2: patch-kernel.patch --]
[-- Type: text/plain, Size: 2582 bytes --]
--- scripts/patch-kernel.orig Thu Jun 20 10:09:38 2002
+++ scripts/patch-kernel Thu Jun 20 10:45:51 2002
@@ -1,6 +1,6 @@
#! /bin/sh
# Script to apply kernel patches.
-# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
+# usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx ] [ -prexx ] ] ]
# The source directory defaults to /usr/src/linux, and the patch
# directory defaults to the current directory.
# e.g.
@@ -41,18 +41,24 @@
# Added -ac option, use -ac or -ac9 (say) to stop at a particular version
# Dave Gilbert <linux@treblig.org>, 29th September 2001.
+# Added -pre option to work similar to the -ac option.
+# Chris Baumbauer <baumbaca@cs.purdue.edu>, 20th June 2002.
+
# Set directories from arguments, or use defaults.
sourcedir=${1-/usr/src/linux}
patchdir=${2-.}
stopvers=${3-imnotaversion}
-# See if we have any -ac options
+# See if we have any -ac or -pre options
for PARM in $*
do
case $PARM in
-ac*)
gotac=$PARM;
-
+ ;;
+ -pre*)
+ gotpre=$PARM;
+ ;;
esac;
done
@@ -188,6 +194,50 @@
}
applyPatch patch-${CURRENTFULLVERSION}${gotac}
fi
+elif [ x$gotpre != x ]; then
+ # Living dangerously with the -pre patches
+ # I know this is a direct rip from the -ac code, but it should be the same: in theory
+
+ # Lets determine if this is our first -pre patch or if we've already included some in the past
+ if [ -f $patchdir/patch-${CURRENTFULLVERSION}-pre*\.* ]
+ then
+ PREVERSION=$CURRENTFULLVERSION
+ else
+ PREVERSION=$FULLVERSION
+ fi
+
+ # They could have done -pre (get latest) or -prexx where xx=version they want
+ if [ $gotpre == "-pre" ]
+ then
+ # They want the latest version
+ HIGHESTPATCH=0
+ for PATCHNAMES in $patchdir/patch-${PREVERSION}-pre*\.*
+ do
+ ACVALUE=`echo $PATCHNAMES | sed -e 's/^.*patch-[0-9.]*-pre\([0-9]*\).*/\1/'`
+ # Check it is actually a recognised patch type
+ findFile $patchdir/patch-${PREVERSION}-pre${ACVALUE} || break
+
+ if [ $ACVALUE -gt $HIGHESTPATCH ]
+ then
+ HIGHESTPATCH=$ACVALUE
+ fi
+ done
+
+ if [ $HIGHESTPATCH -ne 0 ]
+ then
+ findFile $patchdir/patch-${PREVERSION}-pre${HIGHESTPATCH} || break
+ applyPatch patch-${PREVERSION}-pre${HIGHESTPATCH}
+ else
+ echo "No pre release patches found"
+ fi
+ else
+ # They want an exact version
+ findFile $patchdir/patch-${PREVERSION}${gotpre} || {
+ echo "Sorry, I couldn't find the $gotpre patch for $PREVERSION. Hohum."
+ exit 1
+ }
+ applyPatch patch-${PREVERSION}${gotpre}
+ fi
fi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-20 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-20 5:54 [PATCH] - patch-kernel 2.4.18 Christopher A. Baumbauer
[not found] ` <1142957.qPl0MRWbmq@newssend.sf-tec.de>
2002-06-20 15:53 ` Christopher A. Baumbauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox