Properly report an error for download action write errors am: 430852dc7b
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2605637
Change-Id: I9db2e141482ae0055d10063f00b0dc42cb87bdf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/common/multi_range_http_fetcher.cc b/common/multi_range_http_fetcher.cc
index 6ce3dae..b5bf923 100644
--- a/common/multi_range_http_fetcher.cc
+++ b/common/multi_range_http_fetcher.cc
@@ -21,8 +21,6 @@
#include <algorithm>
#include <string>
-#include "update_engine/common/utils.h"
-
namespace chromeos_update_engine {
// Begins the transfer to the specified URL.
diff --git a/download_action.cc b/download_action.cc
index c0463de..615eb66 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -226,6 +226,10 @@
LOG(ERROR) << "Error " << utils::ErrorCodeToString(code_) << " (" << code_
<< ") in DeltaPerformer's Write method when "
<< "processing the received payload -- Terminating processing";
+ } else {
+ LOG(ERROR) << "Unknown error in DeltaPerformer's Write method when "
+ << "processing the received payload -- Terminating processing";
+ code_ = ErrorCode::kDownloadWriteError;
}
// Don't tell the action processor that the action is complete until we get
// the TransferTerminated callback. Otherwise, this and the HTTP fetcher
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 3bd131d..a9670cd 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -753,12 +753,17 @@
auto generator = partition_update_generator::Create(boot_control_,
manifest_.block_size());
std::vector<PartitionUpdate> untouched_static_partitions;
- TEST_AND_RETURN_FALSE(
- generator->GenerateOperationsForPartitionsNotInPayload(
+ if (!generator->GenerateOperationsForPartitionsNotInPayload(
install_plan_->source_slot,
install_plan_->target_slot,
touched_partitions,
- &untouched_static_partitions));
+ &untouched_static_partitions)) {
+ LOG(ERROR)
+ << "Failed to generate operations for partitions not in payload "
+ << android::base::Join(touched_partitions, ", ");
+ *error = ErrorCode::kDownloadStateInitializationError;
+ return false;
+ }
partitions_.insert(partitions_.end(),
untouched_static_partitions.begin(),
untouched_static_partitions.end());
diff --git a/payload_consumer/filesystem_verifier_action.cc b/payload_consumer/filesystem_verifier_action.cc
index abfae72..5342e6f 100644
--- a/payload_consumer/filesystem_verifier_action.cc
+++ b/payload_consumer/filesystem_verifier_action.cc
@@ -96,10 +96,10 @@
install_plan_ = GetInputObject();
if (install_plan_.partitions.empty()) {
- LOG(INFO) << "No partitions to verify.";
+ LOG(ERROR) << "No partitions to verify.";
if (HasOutputPipe())
SetOutputObject(install_plan_);
- abort_action_completer.set_code(ErrorCode::kSuccess);
+ abort_action_completer.set_code(ErrorCode::kFilesystemVerifierError);
return;
}
// partition_weight_[i] = total size of partitions before index i.