From: Mike Frankowski (mfrankow@hamline.edu)
Date: 11/30/92


From: mfrankow@hamline.edu (Mike Frankowski)
Subject: Re: Problems patching kernel
Date: 1 Dec 1992 00:55:22 GMT

Phillip Rzewski (kutcha@eos.acm.rpi.edu) wrote:
:
: Now I have the need to go back and look at some old kernel sources and I
: am having major problems with the patching mechanism. I am working with the
: files in pub/linux/sources/system on tsx-11.mit.edu. First I got the tar.Z
: of the 0.98 sources, and the patches 1, 2, and 3. (I am going for 0.98.3
: here).
:
: I have noticed this problem whenever I try to patch kernel sources.
: Even" when there is total success, it dumps tons of files into the directory
: where I am (/usr/src in this case) when it should have put them somewhere
: in the linux directory. I find that by looking through the patch file to see
: where they should have gone and moving them manually I can solve the
: problem. This didn't bother me when doing the first patch, but when doing the
: second patch which contains all the FPU-emu code, it didn't even make the
: FPU-emu directory and dumped ALL the FPU files into /usr/src. I even took
: the time to move THOSE (plus several other non-FPUs it dumped) to their
: homes. Then when doing the third I got a couple failed hunks in Makefile,
: a few more dumped files which I moved to their homes. Unfortunately the
: failed hunks in the Makefile wrecked everything and now the Makefile is
: not useful enough to compile with.
:
: Am I missing an option or something? I read the patch manpage and all
: the READMEs in the pub/linux/sources/system directory and nowhere does it
: say I should EXPECT this behavior, nor does it suggest a patch command to
: use, so I could only assume that if I used "patch -s < patchfile" and
: didn't get any complaints it was behaving itself.
:
: --
: Phillip Andrew Rzewski Internet: kutcha@acm.rpi.edu
: "Police are anxious to speak to anyone who saw the crime... ladies with
: large breasts... or just anyone who likes policemen." --- Monty Python

Sure, I will help ya.

patch -p0 < patchfile

the -p0 will NOT strip off the leading pathnames :)

Good luck...

(I had this same problem till a friend told me about -p0)

Mike