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

Matt D. matt@codespunk.com
Thu Jun 20 05:47:00 GMT 2013


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.


On 6/18/2013 1:36 AM, Matt D. wrote:
> Built the latest source 0.60 (same version as Cygwin) from
> http://freecode.com/projects/quilt. Built on CentOS 6.4 and passes my
> previously provided test just fine.
>
> Downloaded the same source to Cygwin, rebuilt, replaced quilt in /bin;
> test still errors out. I also tried the latest cygwin1.dll snapshot;
> same problem.
>
>
> On 6/18/2013 1:09 AM, Matt D. wrote:
>> The last e-mail I supplied to the mailing list was missing the link to
>> the example. See this one for the link.
>>
>> ---
>>
>> There seems to be a problem with Cygwin's quilt. This simple example
>> simply alters a #define from 'MESAGL' to 'NX_MESAGL'. That's it.
>>
>> New quilt created, ok.
>> New patch, ok.
>> Edit file, ok.
>> Refresh (create patch), ok.
>> Rollback changes, ok.
>> Reapply patch.. error:
>>
>> >>> quilt push
>> >>> Applying patch test.patch
>> >>> patching file Imakefile
>> >>> Hunk #1 FAILED at 2.
>> >>> 1 out of 1 hunk FAILED -- rejects in file Imakefile
>> >>> Patch test.patch does not apply (enforce with -f)
>>
>> http://codespunk.com/files/upload/cygwin_quilt_00.zip
>>
>> Extract to a directory, cd in, and run 'quilt push' to generate the
>> error.
>>
>>
>>
>> --
>> 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
>
>
>

--
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



More information about the Cygwin mailing list