On Fri, 8 Sep 2000, Andreas Beck wrote:
>
> > > I really appreciate all this feedback but it doesn't address the origional
> > > question of how I go about installing this patch.
>
> > The command you want is "patch".
> > From the top level of your linux source tree, try:
> > patch -p1 < /path/to/the/patch/file
> >
> > If it can't find the files, you may need to try -p0 instead. (The
> > -p<x> switch always confuses me, even though it does make sense.)
>
> O.K. - his patch said:
>
> +++ linux/arch/i386/boot/video.S
>
> meaning it will try to patch that file, if run with the -p0 switch.
>
> In -p[number] the number says, how many directories to strip from the
> patch given in the patchfile. This is to allow for differently named
> install-directories.
>
> That is in you case, you either go to /usr/src and use patch -p0
> or you go to /usr/src/linux and use patch -p1. In the latter case,
> patch will strip out the leading linux/ from the filename in the
> .diff file, thus avoiding a double linux/ in the total path.
>
> > If it reports that part of the patch was rejected, it means that the
> > patch is for a different version of the kernel...
>
> Yes. It could also claim to have detected a previously applied patch. In
> that case bail out, don't reverse-apply the patch (it would remove that
> functionality, then).
Also, there are several options to the patch command which will
loosen the pattern-matching tolerances and _possibly_ make more of the
patch install correctly. These options can be quite useful if (for
example) the patch context just moved 20 lines down in the original source
code but is still basically the same code to be patched. In the Linux
kernel, that situation occurs often. OR they can make the patch install
completely broken if the underlying code _has_ changed. 'man patch' for
details.
Jon
---
'Cloning and the reprogramming of DNA is the first serious step in
becoming one with God.'
- Scientist G. Richard Seed