diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2024-01-19 03:42:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-01-19 03:42:59 +0000 |
commit | b18b1f7694cb97d10e1a9b857fc56c4432fbe7d7 (patch) | |
tree | 8a8a711fe88ba06f4d4b87b6fa8f59852bc2152e | |
parent | 587c48d59d3686db7646e93adb33efcc87a37b59 (diff) | |
parent | 99cbbe7c4ccc4ceb805b8ff98b0fbde66fcecbde (diff) | |
download | update_engine-b18b1f7694cb97d10e1a9b857fc56c4432fbe7d7.tar.gz |
Fix sideload OTA breakage am: 99cbbe7c4c
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2918733
Change-Id: I4d6e8f86824aac93a176a4633edaa7b4b660de5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | payload_consumer/postinstall_runner_action.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc index 2cfd3c6b..bfdd39e3 100644 --- a/payload_consumer/postinstall_runner_action.cc +++ b/payload_consumer/postinstall_runner_action.cc @@ -36,6 +36,8 @@ #include "update_engine/common/action_processor.h" #include "update_engine/common/boot_control_interface.h" +#include "update_engine/common/error_code_utils.h" +#include "update_engine/common/platform_constants.h" #include "update_engine/common/subprocess.h" #include "update_engine/common/utils.h" @@ -443,7 +445,8 @@ void PostinstallRunnerAction::CompletePostinstall(ErrorCode error_code) { DEFER { if (error_code != ErrorCode::kSuccess && error_code != ErrorCode::kUpdatedButNotActive) { - LOG(ERROR) << "Postinstall action failed."; + LOG(ERROR) << "Postinstall action failed. " + << utils::ErrorCodeToString(error_code); // Undo any changes done to trigger Powerwash. if (powerwash_scheduled_) @@ -453,10 +456,13 @@ void PostinstallRunnerAction::CompletePostinstall(ErrorCode error_code) { }; if (error_code == ErrorCode::kSuccess) { if (install_plan_.switch_slot_on_reboot) { - if (!boot_control_->GetDynamicPartitionControl()->MapAllPartitions()) { - LOG(ERROR) << "Failed to map all partitions before marking snapshot as " - "ready for slot switch."; - return; + if constexpr (!constants::kIsRecovery) { + if (!boot_control_->GetDynamicPartitionControl()->MapAllPartitions()) { + LOG(WARNING) + << "Failed to map all partitions before marking snapshot as " + "ready for slot switch. Subsequent FinishUpdate() call may or " + "may not work"; + } } if (!boot_control_->GetDynamicPartitionControl()->FinishUpdate( install_plan_.powerwash_required) || |