Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch :
http://hackage.haskell.org/trac/ghc/changeset/221ce6c41ba7d3f7af6fa41f7979d63db13832fb >--------------------------------------------------------------- commit 221ce6c41ba7d3f7af6fa41f7979d63db13832fb Author: Duncan Coutts <[email protected]> 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@GlobalPackageDB:dbs) = packageDBs + in db : UserPackageDB : dbs, + --TODO: use Ord instance: + -- insert UserPackageDB packageDBs usePackageIndex = if UserPackageDB `elem` packageDBs then index else Nothing, _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
