[commit: Cabal] : Fix combination of --global --package-db when compiling Setup.hs scripts (221ce6c)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:04:54 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch :
http://hackage.haskell.org/trac/ghc/changeset/221ce6c41ba7d3f7af6fa41f7979d63db13832fb
>---------------------------------------------------------------
commit 221ce6c41ba7d3f7af6fa41f7979d63db13832fb
Author: Duncan Coutts <duncan at haskell.org>
Date: Fri Dec 18 16:51:19 2009 +0000
Fix combination of --global --package-db when compiling Setup.hs scripts
The order of the package db stack is important.
>---------------------------------------------------------------
cabal-install/Distribution/Client/Install.hs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Distribution/Client/Install.hs b/cabal-install/Distribution/Client/Install.hs
index 39b6992..0119c90 100644
--- a/cabal-install/Distribution/Client/Install.hs
+++ b/cabal-install/Distribution/Client/Install.hs
@@ -244,7 +244,10 @@ installWithPlanner planner verbosity packageDBs repos comp conf
-- install. However we also allow looking in a specific package db.
usePackageDB = if UserPackageDB `elem` packageDBs
then packageDBs
- else packageDBs ++ [UserPackageDB],
+ else let (db at GlobalPackageDB:dbs) = packageDBs
+ in db : UserPackageDB : dbs,
+ --TODO: use Ord instance:
+ -- insert UserPackageDB packageDBs
usePackageIndex = if UserPackageDB `elem` packageDBs
then index
else Nothing,
More information about the Cvs-libraries
mailing list