in reply to Re: make dist (ExtUtils::MakeMaker) on Windows stores text files with DOS line endings in .tar.gz archive
in thread make dist (ExtUtils::MakeMaker) on Windows stores text files with DOS line endings in .tar.gz archive

It's up to the tar utility of the user who downloads the tar.gz to handle the text files appropriately when unpacking the archive.
That sounds weird. I had half and half expected that the tar utility would handle it, when creating the .tar(.gz) file. But apparently, it doesn't, as the CRs are present in the archive.

But, it still feels like a more reasonable expectation to me, because you (and your make) knows what platform you're on when building the archive, so converting it to a common format is easy. The client has less info, he doesn't actually know what platform it originates from, so converting it from whatever into his own native format involves more guesswork.

  • Comment on Re^2: make dist (ExtUtils::MakeMaker) on Windows stores text files with DOS line endings in .tar.gz archive

Replies are listed 'Best First'.
Re^3: make dist (ExtUtils::MakeMaker) on Windows stores text files with DOS line endings in .tar.gz archive
by syphilis (Archbishop) on Nov 20, 2006 at 11:59 UTC
    I had half and half expected that the tar utility would do it, when creating the .tar(.gz) file

    I'm thinking that when the tar utility creates the archive it should do nothing other than pack the files it has been given ... and that gzip should do nothing other than gzip the archive. (Why should the tar utility convert to nix endings when, for all it knows, the tarball is never going to be unpacked onto a nix machine anyway ?)The clever bit needs to happen when the archive is unpacked - at which point the tar utility looks at the line endings and adjusts them as needed (iff needed).

    Personally, on Win32, I make sure that the tar utility leaves the line endings as they are - that way I don't have to worry about the tar utility amending files that it shouldn't. (I have been bitten by this.) Worst case scenario (for me) is that I then have to view the text files in Wordpad (rather than Notepad) to have them dispayed in a sane fashion.

    Cheers,
    Rob