Do not include signature dummy operation in major version 2.
It only exists for compatibility reason, for major version 2, there's no
point to add this any more.
Bug: None
TEST=Applied the new payload to a device.
Change-Id: I5803ab755415a1ba3d7460d82956bfe6e9fd4547
diff --git a/delta_performer.cc b/delta_performer.cc
index eac4259..c4dc2e4 100644
--- a/delta_performer.cc
+++ b/delta_performer.cc
@@ -1349,6 +1349,20 @@
}
}
+ if (major_payload_version_ != kChromeOSMajorPayloadVersion) {
+ if (manifest_.has_old_rootfs_info() ||
+ manifest_.has_new_rootfs_info() ||
+ manifest_.has_old_kernel_info() ||
+ manifest_.has_new_kernel_info() ||
+ manifest_.install_operations_size() != 0 ||
+ manifest_.kernel_install_operations_size() != 0) {
+ LOG(ERROR) << "Manifest contains deprecated field only supported in "
+ << "major payload version 1, but the payload major version is "
+ << major_payload_version_;
+ return ErrorCode::kPayloadMismatchedType;
+ }
+ }
+
// TODO(garnold) we should be adding more and more manifest checks, such as
// partition boundaries etc (see chromium-os:37661).