update_engine: Move setting kernel_max_rollforward earlier
- Originally this was happening late in TransferComplete
- Until the value is set dynamically from the response
ensure the TPM values are updated regardless of the result
BUG=chromium:814090
TEST=FEATURES=test emerge-samus update_engine
Change-Id: I330c7a5c5e2fd372564a07df54b528961a569cad
Reviewed-on: https://chromium-review.googlesource.com/1060288
Commit-Ready: Zentaro Kavanagh <zentaro@chromium.org>
Tested-by: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org>
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index c18f38f..0d529a9 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -1126,6 +1126,9 @@
PayloadStateInterface* const payload_state = system_state_->payload_state();
+ // Set the max kernel key version based on whether rollback is allowed.
+ SetMaxKernelKeyVersionForRollback();
+
// Events are best effort transactions -- assume they always succeed.
if (IsEvent()) {
CHECK(!HasOutputPipe()) << "No output pipe allowed for event requests.";
@@ -1221,9 +1224,6 @@
payload_state->SetUsingP2PForSharing(false);
}
- // Set the max kernel key version based on whether rollback is allowed.
- SetMaxKernelKeyVersionForRollback();
-
// Update the payload state with the current response. The payload state
// will automatically reset all stale state if this response is different
// from what's stored already. We are updating the payload state as late