Remove SystemState from post-install step.
The post-install action only requires to mark the new slot as ready,
for which it was including a reference to the whole SystemState. This
patch removes said dependency replacing it for just the
BootControlInterface.
Bug: 25773375
TEST=FEATURES=test emerge-link update_engine; mma
Change-Id: I814d47c138c7565e9a80f316f25e124adb0d9c4e
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index 33bbf5b..84ca398 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -25,6 +25,7 @@
#include <base/files/file_util.h>
#include "update_engine/common/action_processor.h"
+#include "update_engine/common/boot_control_interface.h"
#include "update_engine/common/subprocess.h"
#include "update_engine/common/utils.h"
@@ -159,8 +160,7 @@
// We only attempt to mark the new slot as active if all the postinstall
// steps succeeded.
if (error_code == ErrorCode::kSuccess &&
- !system_state_->boot_control()->SetActiveBootSlot(
- install_plan_.target_slot)) {
+ !boot_control_->SetActiveBootSlot(install_plan_.target_slot)) {
error_code = ErrorCode::kPostinstallRunnerError;
}