Add option to override minor version
We want to fully test zucchini before pushing it to droidfood. So we plan
to add an option to override the minor version, and enable zucchini in
tradefed test first.
Also temporarily disble the config version test because we haven't bumped
the minor version yet.
Bug: 197361113
Test: TH
Change-Id: Ibdae57611b1dbf23d8a7d0e706ca3109d22088f9
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index 0be2b0d..74294d8 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -38,6 +38,8 @@
# --disable_fec_computation Disable the on device fec data computation for
# incremental update. This feature is enabled by
# default
+# --force_minor_version Override the minor version used for delta
+# generation.
#
# Hash command arguments:
# --unsigned_payload the input unsigned payload to generate the hash from
@@ -204,6 +206,8 @@
"Optional: Disables Virtual AB Compression when installing the OTA"
DEFINE_string enable_vabc_xor "" \
"Optional: Enable the use of Virtual AB Compression XOR feature"
+ DEFINE_string force_minor_version "" \
+ "Optional: Override the minor version for the delta generation."
fi
if [[ "${COMMAND}" == "hash" || "${COMMAND}" == "sign" ]]; then
DEFINE_string unsigned_payload "" "Path to the input unsigned payload."
@@ -547,6 +551,9 @@
# old updater.
FORCE_MINOR_VERSION=$(read_option_uint "${ue_config}" \
"PAYLOAD_MINOR_VERSION" 2)
+ if [[ -n "${FLAGS_force_minor_version}" ]]; then
+ FORCE_MINOR_VERSION="${FLAGS_force_minor_version}"
+ fi
FORCE_MAJOR_VERSION=$(read_option_uint "${ue_config}" \
"PAYLOAD_MAJOR_VERSION" 2)