[Haskell-cafe] Cabal sdist bug patch

John D. Ramsdell ramsdell0 at gmail.com
Wed Dec 1 17:27:50 CET 2010


So as far as I can tell, it's easy to fix the cabal sdist bug.  The
module that generates a distribution simply has to use
insntallOrdinaryFile when copying files, not the version of copyFile
that is exported by Distribution.Simple.Util.  I'll respond to the
open ticket with this patch later today.

John

$ diff -ur ocabal-1.8 cabal-1.8
Only in cabal-1.8: .darcs-boring
diff -ur ocabal-1.8/Distribution/Simple/SrcDist.hs
cabal-1.8/Distribution/Simple/SrcDist.hs
--- ocabal-1.8/Distribution/Simple/SrcDist.hs	2010-12-01
11:16:00.629309262 -0500
+++ cabal-1.8/Distribution/Simple/SrcDist.hs	2010-12-01 11:18:37.449933651 -0500
@@ -78,7 +78,7 @@
          ( Version(versionBranch) )
 import Distribution.Simple.Utils
          ( createDirectoryIfMissingVerbose, withUTF8FileContents, writeUTF8File
-         , copyFiles, copyFileVerbose
+         , installOrdinaryFile, installOrdinaryFiles
          , findFile, findFileWithExtension, matchFileGlob
          , withTempDirectory, defaultPackageDesc
          , die, warn, notice, setupMessage )
@@ -341,6 +341,12 @@
   createDirectoryIfMissingVerbose verbosity True (takeDirectory targetFile)
   copyFileVerbose verbosity file targetFile

+copyFileVerbose :: Verbosity -> FilePath -> FilePath -> IO ()
+copyFileVerbose = installOrdinaryFile
+
+copyFiles :: Verbosity -> FilePath -> [(FilePath, FilePath)] -> IO ()
+copyFiles = installOrdinaryFiles
+
 printPackageProblems :: Verbosity -> PackageDescription -> IO ()
 printPackageProblems verbosity pkg_descr = do
   ioChecks      <- checkPackageFiles pkg_descr "."
$
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cabal.diff
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101201/3fd6d018/attachment.bin>


More information about the Haskell-Cafe mailing list