[commit: Cabal] : Workaround for 'cabal install world' problem with empty world file (076dde2)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:06:15 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch :
http://hackage.haskell.org/trac/ghc/changeset/076dde2da0edb983fa7f344ac5dc060f92af29ae
>---------------------------------------------------------------
commit 076dde2da0edb983fa7f344ac5dc060f92af29ae
Author: Duncan Coutts <duncan at haskell.org>
Date: Mon May 10 03:30:51 2010 +0000
Workaround for 'cabal install world' problem with empty world file
The current dep resolver does not like an empty set of targets
along with a non-empty set of constraints.
>---------------------------------------------------------------
cabal-install/Distribution/Client/Dependency.hs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Distribution/Client/Dependency.hs b/cabal-install/Distribution/Client/Dependency.hs
index 8971105..0d74d95 100644
--- a/cabal-install/Distribution/Client/Dependency.hs
+++ b/cabal-install/Distribution/Client/Dependency.hs
@@ -153,7 +153,12 @@ dependencyResolver
-> [PackageName]
-> Progress String String InstallPlan
dependencyResolver resolver platform comp installed available
- pref constraints targets =
+ pref constraints targets
+ -- TODO: the top down resolver chokes on the base constraints
+ -- below when there are no targets and thus no dep on base.
+ -- Need to refactor contraints separate from needing packages.
+ | null targets = return (toPlan [])
+ | otherwise =
let installed' = hideBrokenPackages installed
-- If the user is not explicitly asking to upgrade base then lets
-- prevent that from happening accidentally since it is usually not what
More information about the Cvs-libraries
mailing list