Commit 67fefc02 authored by bjorn@bringert.net's avatar bjorn@bringert.net
Browse files

Changed finalization to say that all installed and available packages can be...

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.
parent 7ded699b
......@@ -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)
......@@ -93,16 +93,19 @@ getDependencies :: Compiler
-> [PkgInfo] -- ^ Available packages
-> PkgInfo
-> [String] -- ^ Options
-> [Dependency]
getDependencies comp _installed _available pkg opts
-> [Dependency]
-- ^ 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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment