Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/af47510e62b4cbaa1981accecc59dda71b9a658f >--------------------------------------------------------------- commit af47510e62b4cbaa1981accecc59dda71b9a658f Author: Duncan Coutts <[email protected]> Date: Wed Jan 14 14:35:40 2009 +0000 Don't add installed constraints system packages that are not installed In particular fixes a problem (ticket #439) where we required the installed version of ghc-prim with compilers that do not have that package such as ghc-6.8 and older, hugs, nhc, lhc etc. >--------------------------------------------------------------- cabal-install/Distribution/Client/Dependency.hs | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cabal-install/Distribution/Client/Dependency.hs b/cabal-install/Distribution/Client/Dependency.hs index 84d9cfe..b5e2710 100644 --- a/cabal-install/Distribution/Client/Dependency.hs +++ b/cabal-install/Distribution/Client/Dependency.hs @@ -165,11 +165,11 @@ dependencyResolver resolver platform comp installed available -- prevent that from happening accidentally since it is usually not what -- you want and it probably does not work anyway. We do it by adding a -- constraint to only pick an installed version of base and ghc-prim. - extraConstraints + extraConstraints = + [ PackageInstalledConstraint pkgname | all (/=PackageName "base") targets - = [ PackageInstalledConstraint (PackageName "base") - , PackageInstalledConstraint (PackageName "ghc-prim") ] - | otherwise = [] + , pkgname <- [ PackageName "base", PackageName "ghc-prim" ] + , not (null (PackageIndex.lookupPackageName installed pkgname)) ] preferences = interpretPackagesPreference (Set.fromList targets) pref in fmap toPlan $ resolver platform comp installed' available _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
