brillo_update_payload: Disable Brillo deltas for minor version <= 2.

Support for deltas in the client landed for Brillo with minor version
3. While there shouldn't be any clients using such old version,
developpers may have upload these images to our server and deltas are
expected to fail.

This CL makes brillo_update_payload exit with error code 100 when the
source image does not support deltas.

Bug: 26193066
TEST=`brillo_update_payload` from old image failed and returned exit code 100.

Change-Id: Ia092316e73e5f5fce5a560e5eb19cf7f1ed1d0d2
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")