[commit: Cabal] : Fix selection of paired packages (36c785a)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:59:51 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch :
http://hackage.haskell.org/trac/ghc/changeset/36c785af0b62d60cec5ac1446702d00c4e2f82ce
>---------------------------------------------------------------
commit 36c785af0b62d60cec5ac1446702d00c4e2f82ce
Author: Duncan Coutts <duncan at haskell.org>
Date: Mon Oct 6 04:06:16 2008 +0000
Fix selection of paired packages
>---------------------------------------------------------------
.../Client/Dependency/TopDown/Constraints.hs | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cabal-install/Distribution/Client/Dependency/TopDown/Constraints.hs b/cabal-install/Distribution/Client/Dependency/TopDown/Constraints.hs
index 158eeb8..46d946b 100644
--- a/cabal-install/Distribution/Client/Dependency/TopDown/Constraints.hs
+++ b/cabal-install/Distribution/Client/Dependency/TopDown/Constraints.hs
@@ -129,13 +129,13 @@ empty installed available = Constraints pkgs pairs mempty
-- pick up cases like base-3 and 4 where one version depends on the other:
pairs = Map.fromList
- [ (name, (v1, v2))
+ [ (name, (packageVersion pkgid1, packageVersion pkgid2))
| [pkg1, pkg2] <- PackageIndex.allPackagesByName installed
- , let name = packageName pkg1
- v1 = packageVersion pkg1
- v2 = packageVersion pkg2
- , any ((v1==) . packageVersion) (depends pkg2)
- || any ((v2==) . packageVersion) (depends pkg1) ]
+ , let name = packageName pkg1
+ pkgid1 = packageId pkg1
+ pkgid2 = packageId pkg2
+ , any ((pkgid1==) . packageId) (depends pkg2)
+ || any ((pkgid2==) . packageId) (depends pkg1) ]
-- | The package choices that are still available.
--
More information about the Cvs-libraries
mailing list