update_engine: Implement SOURCE_COPY/SOURCE_BSDIFF operations.
Implement SOURCE_COPY and SOURCE_BSDIFF in DeltaPerformer. These new
operations are the same as MOVE and BSDIFF, respectively, except
that they read from the source partition rather than the destination
partition.
Also fills in the source paths in omaha_response_handler_action, which
were previously not being set.
BUG=chromium:461632
TEST=`FEATURES=test emerge-link update_engine` and manual testing.
Change-Id: I81eba5780c73ed920a5db72702d9d7c67dbaa673
Reviewed-on: https://chromium-review.googlesource.com/263747
Reviewed-by: Allie Wood <alliewood@chromium.org>
Commit-Queue: Allie Wood <alliewood@chromium.org>
Trybot-Ready: Allie Wood <alliewood@chromium.org>
Tested-by: Allie Wood <alliewood@chromium.org>
diff --git a/delta_performer.h b/delta_performer.h
index fd234a2..a57788d 100644
--- a/delta_performer.h
+++ b/delta_performer.h
@@ -130,7 +130,7 @@
// unavailable; it returns ErrorCode::kSignedDeltaPayloadExpectedError if the
// public key is available but the delta payload doesn't include a signature.
ErrorCode VerifyPayload(const std::string& update_check_response_hash,
- const uint64_t update_check_response_size);
+ const uint64_t update_check_response_size);
// Reads from the update manifest the expected sizes and hashes of the target
// kernel and rootfs partitions. These values can be used for applied update
@@ -276,6 +276,12 @@
bool PerformBsdiffOperation(
const DeltaArchiveManifest_InstallOperation& operation,
bool is_kernel_partition);
+ bool PerformSourceCopyOperation(
+ const DeltaArchiveManifest_InstallOperation& operation,
+ bool is_kernel_partition);
+ bool PerformSourceBsdiffOperation(
+ const DeltaArchiveManifest_InstallOperation& operation,
+ bool is_kernel_partition);
// Returns true if the payload signature message has been extracted from
// |operation|, false otherwise.