[Hackage] #525: The install functions copy N executables N times

#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 | Keywords:
Difficulty: very easy (<1 hour) | Ghcversion:
Platform: |
----------------------------------+-----------------------------------------
The patch:
Fri Aug 24 17:27:49 CEST 2007 Duncan Coutts

#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
* 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

#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: ----------------------------+----------------------------------------------- Comment (by duncan): Oh that's exciting, thanks for spotting it. In the HEAD branch I think we should fix it by having `GHC.installExe` take the individual exe to install as a parameter. That's more useful that having it do all of them in a batch. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/525#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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: ----------------------------+----------------------------------------------- Comment (by np): I agree. I think the original purpose of doing it in batch was to do once things like making the directory. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/525#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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: ----------------------------+----------------------------------------------- Comment (by simonmar): I pushed these patches to the GHC 6.10 branch of Cabal. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/525#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#525: The install functions copy N executables N times ----------------------------+----------------------------------------------- Reporter: np | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.8 Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * priority: high => normal * severity: major => normal * milestone: => Cabal-1.8 Comment: In the end we decided to only push the first patch with the actual fix. The other patches which try and make the API nicer/clearer we'll leave off for the 1.6.x branch since they change the API. In the development branch we'll do something similar as mentioned in comment:2. Lowering the priority as the fix is now in the 1.6 branch. We can keep this ticket open for the fix to be done properly in the development branch. Setting the milestone for the next major version. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/525#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#525: The install functions copy N executables N times ----------------------------+----------------------------------------------- Reporter: np | Owner: Type: defect | Status: closed Priority: normal | Milestone: Cabal-1.8 Component: Cabal library | Version: HEAD Severity: normal | Resolution: fixed Keywords: | Difficulty: very easy (<1 hour) Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Should now be fixed in Cabal HEAD. The code there now does this all quite differently. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/525#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage