Unverified Commit fcabd874 authored by Dave Laing's avatar Dave Laing Committed by Mikhail Glushenkov
Browse files

Fix how the timestamps of add-source packages are updated.

This is to address #1375.

Previously they were updated in the post install phase, which
would mean that the sources did not have their timestamps
updated unless the package being installed completed successfully.

This change moves the updating of the timestamps to the end of
the install phase, so that the add-source packages that are
successfully installed get their timestamps updated regardless of
the overall outcome of the installation.
parent c38e36b8
......@@ -337,7 +337,7 @@ processInstallPlan verbosity
unless (dryRun || nothingToInstall) $ do
buildOutcomes <- performInstallations verbosity
args installedPkgIndex installPlan
args installedPkgIndex installPlan
postInstallActions verbosity args userTargets installPlan buildOutcomes
where
installPlan = InstallPlan.configureInstallPlan configFlags installPlan0
......@@ -821,6 +821,9 @@ postInstallActions verbosity
,globalFlags, configFlags, _, installFlags, _)
targets installPlan buildOutcomes = do
updateSandboxTimestampsFile verbosity useSandbox mSandboxPkgInfo
comp platform installPlan buildOutcomes
unless oneShot $
World.insert verbosity worldFile
--FIXME: does not handle flags
......@@ -846,9 +849,6 @@ postInstallActions verbosity
printBuildFailures verbosity buildOutcomes
updateSandboxTimestampsFile verbosity useSandbox mSandboxPkgInfo
comp platform installPlan buildOutcomes
where
reportingLevel = fromFlag (installBuildReports installFlags)
logsDir = fromFlag (globalLogsDir globalFlags)
......
......@@ -38,8 +38,11 @@
* 'new-build' now checks for the existence of executables for
build-tools and build-tool-depends dependencies in the solver
(#4884).
* Fixed a spurious warning telling the user to run 'cabal update'
* Fixed a spurious warning telling the user to run 'cabal update'
when it wasn't necessary (#4444).
* Packages installed in sandboxes via 'add-source' now have
their timestamps updated correctly and so will not be reinstalled
unncecessarily if the main install command fails (#1375).
2.0.0.1 Mikhail Glushenkov <mikhail.glushenkov@gmail.com> December 2017
* Support for GHC's numeric -g debug levels (#4673).
......
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