Point one: patch wants to reach its patches from standard input by default, not from a file you give it on the command line.
Point two: the patch files themselves contain the paths of the files to be patched:
diff --git a/Makefile.PL b/Makefile.PL index 26ab13e..b966faa 100644 --- a/Makefile.PL # original file name +++ b/Makefile.PL # name of modified file
(comments added by me).
The filnames are a/Makefile.PL and b/Makefile.PL. But if your Makefile.PL is in the current directory, you need to tell patch to strip the a/ and b/ prefix. That's just one directory level each, so you need the -p1 option.
In summary, in the directory that contains the code, to have patch modify the files in-place, run:
patch -p1 < file-with-the-patches.diff
In reply to Re: How to patch modules with CPAN patch releases
by moritz
in thread How to patch modules with CPAN patch releases
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |