At 09:00 +0100 11 Jan 2002, Nick Wilson <[EMAIL PROTECTED]> wrote: > can anyone make sense of the output I'm getting when trying to use the > %_patch?
> can't find file to patch at input line 4 > Perhaps you should have used the -p or --strip option? The above line is patch itself telling you what the problem is. You need to use an appropriate -p option. This option tells it how many levels of directory names to strip from the front of file names in patch files. By default it will strip all directories, and just look for the named file in the current directory. > The text leading up to this was: > -------------------------- > |diff -durp mutt-1.3.22.1/doc/manual.sgml mutt-1.3.22.1.oe.%_.1/doc/manual.sgml > |--- mutt-1.3.22.1/doc/manual.sgml Wed Sep 5 02:52:17 2001 > |+++ mutt-1.3.22.1.oe.%_.1/doc/manual.sgml Wed Sep 5 03:01:26 2001 Here with no -p option, patch would try to change the file named manual.sgml in the current directory. With -p1 it would strip off only the top level directory, and so look for a file named doc/manual.sgml to change; this is likely what you want. If you used -p0, patch would look for the file to change using either of the complete names mentioned above, including the mutt-* part. As a general rule of thumb, you should always run patch from inside the top level directory of the source tree for the program you're patching. If the patch file contains file names that mention what looks like the distribution directory (in this case stuff like mutt-version or possibly just mutt by itself), you should use -p1. Otherwise you probably want to use -p0 (although in these cases you can often get away without using a -p option at all). -- Aaron Schrab [EMAIL PROTECTED] http://www.execpc.com/~aarons/ Let's say the docs present a simplified view of reality... :-) --Larry Wall