brillo_update_payload: Disable Brillo deltas for minor version <= 2.
am: 61e1fa89e0
* commit '61e1fa89e01952d772f4aca843fa817a7a30fe66':
brillo_update_payload: Disable Brillo deltas for minor version <= 2.
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index 22f07dc..4902c0c 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -45,6 +45,9 @@
# specified file
# Note that the number of signature sizes and payload signatures have to match.
+# Exit codes:
+EX_UNSUPPORTED_DELTA=100
+
warn() {
echo "brillo_update_payload: warning: $*" >&2
}
@@ -335,6 +338,13 @@
"PAYLOAD_MINOR_VERSION" 2)
FORCE_MAJOR_VERSION=$(read_option_uint "${ue_config}" \
"PAYLOAD_MAJOR_VERSION" 2)
+
+ # Brillo support for deltas started with minor version 3.
+ if [[ "${FORCE_MINOR_VERSION}" -le 2 ]]; then
+ warn "No delta support from minor version ${FORCE_MINOR_VERSION}. \
+Disabling deltas for this source version."
+ exit ${EX_UNSUPPORTED_DELTA}
+ fi
else
# Target image
local postinstall_config=$(create_tempfile "postinstall_config.XXXXXX")