[Otakar Smrz] Cabal's `sdist` on Win32

Otakar Smrz otakar.smrz at mff.cuni.cz
Wed Nov 1 13:41:32 EST 2006


Neil Mitchell <ndmitchell <at> gmail.com> writes:

> What was the original line here? And why are tar and gzip being used,
> when a much more "windows" thing to do would be to create a .zip file
> - although I guess thats not what people want.

My point was that the current implementation of Hugs has it

-- line 133 of Distribution.Simple.SrcDist

   system $ "(cd " ++ tmpDir
            ++ ";tar cf - " ++ (nameVersion pkg_descr)
            ++ ") | gzip -9 >" ++ tarBallFilePath

which is not understood by cmd.exe in WinXP --- () and | are not supported. I
therefore proposed the change of code so that it works:

-- line 133 replaced with these two system calls

   system $ unwords ["tar -C", tmpDir, "-cf",
                     tarBallFilePath, nameVersion pkg_descr]
   system $ unwords ["gzip -9", tarBallFilePath]

-- also redefined to work with gzip

   tarBallName p = (nameVersion p) ++ ".tar"

I had to install gzip and tar, of course, but they are available, so that is not
a problem for me. However, if you and the other developers take this issue
further as to removing the dependency on these external tools, the better for
the users.

Thank you,

Otakar




More information about the cabal-devel mailing list