[commit: Cabal] master: Hide any available base and ghc-prim packages from the dep resolver (57f3ff4)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:54:11 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/57f3ff4342bb3677822b5f156e745a2442f032c0
>---------------------------------------------------------------
commit 57f3ff4342bb3677822b5f156e745a2442f032c0
Author: Duncan Coutts <duncan at haskell.org>
Date: Wed May 21 15:37:00 2008 +0000
Hide any available base and ghc-prim packages from the dep resolver
Previously if the base package was available on hackage then the dep
resolver might try to upgrade it. Unfortunately that's almost
certainly technically impossible at the moment. So now since the dep
resolver does not see these available packages it cannot pick them.
This should fix ticket #174.
>---------------------------------------------------------------
cabal-install/Hackage/Dependency.hs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Hackage/Dependency.hs b/cabal-install/Hackage/Dependency.hs
index 1228bce..91ef270 100644
--- a/cabal-install/Hackage/Dependency.hs
+++ b/cabal-install/Hackage/Dependency.hs
@@ -66,6 +66,10 @@ hideBrokenPackages index =
where
check p x = assert (p x) x
+hideBasePackage :: Package p => PackageIndex p -> PackageIndex p
+hideBasePackage = PackageIndex.deletePackageName "base"
+ . PackageIndex.deletePackageName "ghc-prim"
+
type DependencyResolver a = OS
-> Arch
-> CompilerId
@@ -82,7 +86,9 @@ dependencyResolver
-> [UnresolvedDependency]
-> Either [Dependency] (InstallPlan a)
dependencyResolver resolver os arch comp installed available deps =
- case resolver os arch comp (hideBrokenPackages installed) available deps of
+ let installed' = hideBrokenPackages installed
+ available' = hideBasePackage available
+ in case resolver os arch comp installed' available' deps of
Left unresolved -> Left unresolved
Right pkgs ->
case InstallPlan.new os arch comp (PackageIndex.fromList pkgs) of
More information about the Cvs-libraries
mailing list