[commit: Cabal] : Fix selecting paired packages (a6ca8e6)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:59:57 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch :
http://hackage.haskell.org/trac/ghc/changeset/a6ca8e6746037031507eb0c0aee6094c313748e9
>---------------------------------------------------------------
commit a6ca8e6746037031507eb0c0aee6094c313748e9
Author: Duncan Coutts <duncan at haskell.org>
Date: Tue Oct 7 06:29:30 2008 +0000
Fix selecting paired packages
Previously when we selected base 4 (and as a consequence
slected base 3 too) we didn't properly trace the dependencies
of base 3 so if nothing actually required base 3 then we ended
up with base 3 in the solution but not with syb which it
depends on. Consequently the solution was invalid.
Now we select the paired package properly (hopefully).
>---------------------------------------------------------------
.../Distribution/Client/Dependency/TopDown.hs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cabal-install/Distribution/Client/Dependency/TopDown.hs b/cabal-install/Distribution/Client/Dependency/TopDown.hs
index dfb0646..9d0ac8b 100644
--- a/cabal-install/Distribution/Client/Dependency/TopDown.hs
+++ b/cabal-install/Distribution/Client/Dependency/TopDown.hs
@@ -170,10 +170,10 @@ searchSpace configure constraints selected changes next =
(PackageIndex.lookupPackageId available pkgid')
newPkgs = [ name'
- | dep <- packageConstraints pkg'
+ | dep <- newDeps
, let (Dependency name' _) = untagDependency dep
, null (PackageIndex.lookupPackageName selected' name') ]
- newDeps = packageConstraints pkg'
+ newDeps = concatMap packageConstraints newSelected
next' = Set.delete name
$ foldl' (flip Set.insert) next newPkgs
More information about the Cvs-libraries
mailing list