[commit: Cabal] master: Changed finalization to say that all installed and available packages can be used to resolve dependencies. This is overly optimistic, since some of the available packages may not be installable because of missing deps. We probably need to look at the entire dependency graph. (67fefc0)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:47:08 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/67fefc0244ed03e7557f911b6fd2af0375938f91
>---------------------------------------------------------------
commit 67fefc0244ed03e7557f911b6fd2af0375938f91
Author: bjorn <bjorn at bringert.net>
Date: Mon Oct 8 20:12:51 2007 +0000
Changed finalization to say that all installed and available packages can be used to resolve dependencies. This is overly optimistic, since some of the available packages may not be installable because of missing deps. We probably need to look at the entire dependency graph.
>---------------------------------------------------------------
cabal-install/Hackage/Dependency.hs | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/cabal-install/Hackage/Dependency.hs b/cabal-install/Hackage/Dependency.hs
index 1cfdc28..ee8ea35 100644
--- a/cabal-install/Hackage/Dependency.hs
+++ b/cabal-install/Hackage/Dependency.hs
@@ -30,7 +30,7 @@ import Distribution.Simple.Program (ProgramConfiguration)
import Control.Monad (mplus)
import Data.Char (toLower)
-import Data.List (nubBy, maximumBy, isPrefixOf)
+import Data.List (nub, nubBy, maximumBy, isPrefixOf)
import Data.Maybe (fromMaybe)
import qualified System.Info (arch,os)
@@ -94,15 +94,18 @@ getDependencies :: Compiler
-> PkgInfo
-> [String] -- ^ Options
-> [Dependency]
-getDependencies comp _installed _available pkg opts
+ -- ^ If successful, this is the list of dependencies.
+ -- If flag assignment failed, this is the list of
+ -- missing dependencies.
+getDependencies comp installed available pkg opts
= case e of
- Left missing -> error $ "finalizePackage complained about missing dependencies " ++ show missing
+ Left missing -> missing
Right (desc,_) -> buildDepends desc
where
flags = configurationsFlags opts
e = finalizePackageDescription
flags
- Nothing --(Just $ nub $ installed ++ map pkgInfoId available)
+ (Just $ nub $ installed ++ map pkgInfoId available)
System.Info.os
System.Info.arch
(showCompilerId comp, compilerVersion comp)
More information about the Cvs-libraries
mailing list