This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug with Cygwin's 'quilt' is actually in 'patch'


I'm building from Linux source from the X2Go git repository. The patches are being applied downstream to the last base nx libraries provided by NoMachine. It can't be helped if the original source has CRLF in this case.

I understand that Cygwin is trying to emulate Linux here, but I don't believe that is the appropriate response regarding tools like 'patch' which should not have this kind of limitation. The fact that it thinks:

> \r\n <> \r\n

but..

> \r\n == \n

As I mentioned previously, patch does NOT have this issue on Linux using the EXACT SAME test case.

This is definitely a bug.


On 6/20/2013 1:47 AM, Christopher Faylor wrote:
On Wed, Jun 19, 2013 at 11:31:48PM -0400, Matt D. wrote:
I've been looking further into this and it appears as though the problem
is in 'patch' not 'quilt'. quilt is actually a collection of bash
scripts and calls patch to do the actual patching.

Using the same example I provided earlier in the thread, the same error
occurs when calling patch directly:

$ patch Imakefile patches/test.patch

Running dos2unix on test.patch will allow the patch to apply
successfully. However, this is WRONG. Imakefile and the initially
created test.patch both use CRLF line endings. The patch should
definitely NOT apply by introducing actual disparity.

To summarize, the patch to Imakefile (CRLF) will apply if it is
converted to LF line endings. Using the '--binary' switch seems to be a
workaround for this issue.

Sorry but we're emulating Linux here.  You shouldn't have CRLF endings
on your text file if you want the tools to work reliably.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]