diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-10 08:15:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:42 +0200 |
commit | abccaf9596461215fce0e32322133fb6c39be44f (patch) | |
tree | 3fc16a6e6142d65e6b47ae686ab845cc164478cc /build2/install | |
parent | bcb2a89e111a918a48a132a2a29e0c26d724591d (diff) |
Implement parallel error propagation, keep_going mode
Keep going is the default but there is now the -s|--serial-stop that makes
the driver run serially and stop at first error.
Also fix some lockups, other minor improvements/features.
Diffstat (limited to 'build2/install')
-rw-r--r-- | build2/install/operation.cxx | 10 | ||||
-rw-r--r-- | build2/install/rule.cxx | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/build2/install/operation.cxx b/build2/install/operation.cxx index 56f65e1..9873ac2 100644 --- a/build2/install/operation.cxx +++ b/build2/install/operation.cxx @@ -19,13 +19,21 @@ namespace build2 return mo != disfigure_id ? update_id : 0; } + // Note that we run both install and uninstall serially. The reason for + // this is all the fuzzy things we are trying to do like removing empty + // outer directories if they are empty. If we do this in parallel, then + // those things get racy. Also, since all we do here is creating/removing + // files, there is not going to be much speedup from doing it in parallel. + const operation_info install { install_id, "install", "install", "installing", + "installed", "has nothing to install", // We cannot "be installed". execution_mode::first, + 0, &install_pre, nullptr }; @@ -44,8 +52,10 @@ namespace build2 "uninstall", "uninstall", "uninstalling", + "uninstalled", "is not installed", execution_mode::last, + 0, &install_pre, nullptr }; diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx index 13d8919..323060d 100644 --- a/build2/install/rule.cxx +++ b/build2/install/rule.cxx @@ -181,10 +181,10 @@ namespace build2 // will help a lot in case of any static installable content // (headers, documentation, etc). // - if (pt->synchronized_state () != target_state::unchanged) //@@ MT? - t.prerequisite_targets.push_back (pt); - else + if (pt->unchanged ()) //@@ MT? unmatch (a, *pt); // No intent to execute. + else + t.prerequisite_targets.push_back (pt); // Skip members of ad hoc groups. We handle them explicitly below. // |