in reply to How to patch modules with CPAN patch releases
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to patch modules with CPAN patch releases
by Anonymous Monk on May 27, 2012 at 14:03 UTC | |
by moritz (Cardinal) on May 27, 2012 at 14:26 UTC | |
by Anonymous Monk on May 27, 2012 at 17:55 UTC |