Commit c90a7330 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

'reinstallAddSourceDeps': use correct package DB after 'configure -w'.

parent a824a315
......@@ -726,10 +726,11 @@ maybeReinstallAddSourceDeps verbosity numJobsFlag configFlags' globalFlags' = do
configProgramPaths = configProgramPaths sandboxConfigFlags
`mappend` configProgramPaths savedFlags,
configProgramArgs = configProgramArgs sandboxConfigFlags
`mappend` configProgramArgs savedFlags
-- NOTE: We don't touch the @configPackageDBs@ field because
-- @sandboxConfigFlags@ contains the sandbox location which was set when
-- creating @cabal.sandbox.config@.
`mappend` configProgramArgs savedFlags,
-- NOTE: Unconditionally choosing the value from
-- 'dist/setup-config'. Sandbox package DB location may have been
-- changed by 'configure -w'.
configPackageDBs = configPackageDBs savedFlags
-- FIXME: Is this compatible with the 'inherit' feature?
......@@ -265,6 +265,9 @@ configureAction (configFlags, configExFlags) extraArgs globalFlags = do
whenUsingSandbox useSandbox $ \sandboxDir -> do
initPackageDBIfNeeded verbosity configFlags'' comp conf
-- NOTE: We do not write the new sandbox package DB location to
-- 'cabal.sandbox.config' here because 'configure -w' must not affect
-- subsequent 'install' (for UI compatibility with non-sandboxed mode).
indexFile <- tryGetIndexFilePath config
maybeAddCompilerTimestampRecord verbosity sandboxDir indexFile
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