[Hackage] #525: The install functions copy N executables N times
Hackage
trac at galois.com
Tue Mar 17 06:21:56 EDT 2009
#525: The install functions copy N executables N times
----------------------------+-----------------------------------------------
Reporter: np | Owner:
Type: defect | Status: new
Priority: high | Milestone:
Component: Cabal library | Version: HEAD
Severity: major | Resolution:
Keywords: | Difficulty: very easy (<1 hour)
Ghcversion: | Platform:
----------------------------+-----------------------------------------------
Old description:
> The patch:
>
> Fri Aug 24 17:27:49 CEST 2007 Duncan Coutts <duncan at haskell.org>
> * Only create includes and bin dirs if necessary
> For includes, don't list the include dir in the package registration
> info unless we're actually going to install some include files.
> So we should create fewer pointless empty directories. See bug #97.
>
> in particular this hunk:
> -GHC.installExe verbosity binPref buildPref pkg_descr
> +withExe pkg_descr $ \_ ->
> + GHC.installExe verbosity binPref buildPref pkg_descr
>
> introduced a bug in the case of packages with multiple executables
> (notable h4sh has 42 executables, leading to 1764 calls to cp/strip).
> The withExe is performed twice, once here and once in Dist.Simple.GHC.
>
> I attach a simple patch that fixes this problem by using hasExes insted
> of withExe.
>
> Doing the same with 'withLib' in case of future multiple libraries
> and renaming 'withExe' to 'withExes' would be nice also use these patches
> as you wish.
New description:
The patch:
Fri Aug 24 17:27:49 CEST 2007 Duncan Coutts <duncan at haskell.org>
* Only create includes and bin dirs if necessary
For includes, don't list the include dir in the package registration
info unless we're actually going to install some include files.
So we should create fewer pointless empty directories. See bug #97.
in particular this hunk:
{{{
-GHC.installExe verbosity binPref buildPref pkg_descr
+withExe pkg_descr $ \_ ->
+ GHC.installExe verbosity binPref buildPref pkg_descr
}}}
introduced a bug in the case of packages with multiple executables
(notable h4sh has 42 executables, leading to 1764 calls to cp/strip).
The withExe is performed twice, once here and once in Dist.Simple.GHC.
I attach a simple patch that fixes this problem by using hasExes insted of
withExe.
Doing the same with 'withLib' in case of future multiple libraries
and renaming 'withExe' to 'withExes' would be nice also use these patches
as you wish.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/525#comment:1>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list