On Tue, Mar 15, 2011 at 04:31:36PM -0400, Daniel Kahn Gillmor wrote:
> When upstream distributes source as a .zip (PKZIP) file, sometimes the
> files are stored with MSDOS line-endings, and are marked as text
> within the archive.
> 
> uscan should pass unzip the -a flag to convert these text files to the
> native line endings.
> 
> I'm looking at packaging Peter Gutmann's cryptlib
> (http://cryptlib.com/downloads/), which observes these conventions.
> uscan's default behavior produces a bunch of .c files with CR/LF line
> endings.
> 
> With the attached patch, the line endings are normal.
> 
> Since this patch only changes the repacked files that are marked as
> text, it should not have any adverse effects on binary data.

This relies on zip properly identifying files as text/binary, which it
may not do perfectly, as the man page calls out.  I'd wager that *nix
tools are pretty good at handling non-native line endings (at least
better than my experience with Windows tools), so is it necessary to do
the conversion?  Have you run into issues with CR/LF line ending files
that prompted this patch?

I'm not opposed to using the patch, but I'd be interested in whether the
potential mis-identification happens frequently enough that
auto-converting is more hassle than it's worth.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>

Attachment: signature.asc
Description: Digital signature

Reply via email to