Commit 1a53fe78 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Fix silly bug in cabal configure. Ticket #805.

I made a mistake during the recent refactoring work and was using
the dependency planner in the wrong way. The planner was being
given the available source packages and duely picking them to
satisfy dependencies, but for configure we're supposed to assume
that all dependencies are installed already.
parent f28bbb99
......@@ -49,6 +49,8 @@ import Distribution.System
import Distribution.Verbosity as Verbosity
( Verbosity )
import Data.Monoid (Monoid(..))
-- | Configure the package found in the local directory
configure :: Verbosity
-> PackageDBStack
......@@ -121,7 +123,7 @@ planLocalPackage :: Verbosity -> Compiler
-> AvailablePackageDb
-> IO (Progress String String InstallPlan)
planLocalPackage verbosity comp configFlags configExFlags installed
availabledb = do
(AvailablePackageDb _ availablePrefs) = do
pkg <- readPackageDescription verbosity =<< defaultPackageDesc verbosity
let -- We create a local package and ask to resolve a dependency on it
......@@ -148,8 +150,10 @@ planLocalPackage verbosity comp configFlags configExFlags installed
[ PackageFlagsConstraint (packageName pkg)
(configConfigurationsFlags configFlags) ]
$ standardInstallPolicy installed availabledb
[SpecificSourcePackage localPkg]
$ standardInstallPolicy
(AvailablePackageDb mempty availablePrefs)
[SpecificSourcePackage localPkg]
return (resolveDependencies buildPlatform (compilerId comp) resolverParams)
Supports Markdown
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