Bug#337909: ghc6: regression in Cabal

2005-11-09 Thread Ian Lynagh
On Mon, Nov 07, 2005 at 09:19:41AM +0100, Matej Vela wrote:
 Package: ghc6
 Version: 6.4.1-1
 Severity: serious
 Justification: causes an FTBFS for haskelldb, washngo
 Tags: upstream patch

Thanks. I'll look into this once ghc6's build-depends are in order.


Ian



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#337909: ghc6: regression in Cabal

2005-11-07 Thread Matej Vela
Package: ghc6
Version: 6.4.1-1
Severity: serious
Justification: causes an FTBFS for haskelldb, washngo
Tags: upstream patch

The following upstream change in 6.4.1 breaks packages that build
executables with HS-Source-Dir:

--- ghc6-6.4/libraries/Cabal/Distribution/Simple/Install.hs
+++ ghc6-6.4.1/libraries/Cabal/Distribution/Simple/Install.hs
@@ -107,8 +107,9 @@
   - PackageDescription - IO ()
 installExeGhc verbose pref buildPref pkg_descr
 = do createDirectoryIfMissing True pref
- withExe pkg_descr $ \ (Executable e _ b) -
- copyFileVerbose verbose (buildPref `joinFileName` (hsSourceDir b) 
`joinFileName` e) (pref `joinFileName` e)
+ withExe pkg_descr $ \ (Executable e _ b) - do
+ let exeName = e `joinFileExt` exeExtension
+ copyFileVerbose verbose (buildPref `joinFileName` exeName) (pref 
`joinFileName` exeName)
 
 -- |Install for ghc, .hi and .a
 installLibGHC :: Int  -- ^verbose

The new code looks for executables in dist/build/exeName rather than
dist/build/HS-Source-Dir/exeName where they are built, and the
installation phase breaks.  Patch attached.

Thanks,

Matej
--- ghc6-6.4.1.dist/libraries/Cabal/Distribution/Simple/Install.hs
+++ ghc6-6.4.1/libraries/Cabal/Distribution/Simple/Install.hs
@@ -109,7 +109,7 @@
 = do createDirectoryIfMissing True pref
  withExe pkg_descr $ \ (Executable e _ b) - do
  let exeName = e `joinFileExt` exeExtension
- copyFileVerbose verbose (buildPref `joinFileName` exeName) (pref 
`joinFileName` exeName)
+ copyFileVerbose verbose (buildPref `joinFileName` (hsSourceDir b) 
`joinFileName` exeName) (pref `joinFileName` exeName)
 
 -- |Install for ghc, .hi and .a
 installLibGHC :: Int  -- ^verbose