Skip Menu |

This queue is for tickets about the makepatch CPAN distribution.

Report information
The Basics
Id: 45516
Status: open
Priority: 0/
Queue: makepatch

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.03
Fixed in: (no value)



Subject: makepatch: eol of the patched file not respected in patch
If on Win32 you make a patch of a unix file, the patch mostly has Unix EOL but the lines of the context and the modified lines have Windows-style EOL. - A patch is a text file that always applies to text files. The patch file should have a consistent EOL for the whole file, the Unix style. - When applying a patch, the EOL style of the patched file must be respected. - Checksums should be computed based on a canonical EOL encoding (Unix) to be independent of the local EOL style.
I found that the Windows EOL come from the "diff" output. I'm using GNU diff from gnuwin32.sourceforge.net. Workaround: use "--binary" option of GNU diff I now have the following line in my %HOME%\.makepatchrc: -diff "diff -urp --binary"
Does this imply that the fix you submitted for #45472 is no longer required? It seems that a good README.windows could prevent many of these problems. Can you volunteer?
Le Jeu. Mai. 07 03:40:51 2009, JV a écrit : Show quoted text
> Does this imply that the fix you submitted for #45472 is no longer
required? No. Without the patch you can't even install makepatch/applypatch as the test suite does not pass. I've given up on using applypatch on Windows due to checksum problems if I manually change EOL in patch. I'm now simply using GNU 'patch' in the CPAN shell. makepatch/applypatch can only be used on Win32 with the above workaround only if all patched files have Unix EOL. Show quoted text
> It seems that a good README.windows could prevent many of these > problems. Can you volunteer?
I think that a README is useless. A section in makepatch manual (POD) would be more useful. I haven't the time for now to write it, but you could at least point the reader to this bug.