[commit: Cabal] : When selecting paired packages, select both. (6c2e259)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:59:41 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch :
http://hackage.haskell.org/trac/ghc/changeset/6c2e2598d1c17eb9cd74e5ffcaf3751634875e81
>---------------------------------------------------------------
commit 6c2e2598d1c17eb9cd74e5ffcaf3751634875e81
Author: Duncan Coutts <duncan at haskell.org>
Date: Sun Oct 5 05:38:04 2008 +0000
When selecting paired packages, select both.
>---------------------------------------------------------------
.../Distribution/Client/Dependency/TopDown.hs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Distribution/Client/Dependency/TopDown.hs b/cabal-install/Distribution/Client/Dependency/TopDown.hs
index 31b4291..cd54be2 100644
--- a/cabal-install/Distribution/Client/Dependency/TopDown.hs
+++ b/cabal-install/Distribution/Client/Dependency/TopDown.hs
@@ -152,7 +152,13 @@ searchSpace configure constraints selected changes next =
constraints' selected' (newSelected, newDiscarded) next'
where
selected' = foldl' (flip PackageIndex.insert) selected newSelected
- newSelected = [pkg']
+ newSelected =
+ case Constraints.isPaired constraints (packageId pkg) of
+ Nothing -> [pkg']
+ Just pkgid' -> [pkg', pkg'']
+ where
+ Just pkg'' = fmap (\(InstalledOnly p) -> InstalledOnly p)
+ (PackageIndex.lookupPackageId available pkgid')
newPkgs = [ name'
| dep <- packageConstraints pkg'
More information about the Cvs-libraries
mailing list