Pass --arc_version to cros_set_lsb_release if available
BUG=b:26830205
TEST=./build_image with a board with/without arc_version, check lsb-release
CQ-DEPEND=CL:335894,CL:*252532
Change-Id: I5b2b6227bb97235da6ba3cb7b6c9fa4c9e690c38
Reviewed-on: https://chromium-review.googlesource.com/335648
Commit-Ready: Elijah Taylor <elijahtaylor@chromium.org>
Tested-by: Elijah Taylor <elijahtaylor@chromium.org>
Reviewed-by: Steve Fung <stevefung@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh
index 75a7560..3c8b6dd 100755
--- a/build_library/base_image_util.sh
+++ b/build_library/base_image_util.sh
@@ -222,6 +222,15 @@
official_flag="--official"
fi
+ # Get the version of ARC if available
+ if type set_arc_version &>/dev/null; then
+ set_arc_version
+ fi
+ local arc_version=
+ if [[ -n "${CHROMEOS_ARC_VERSION}" ]]; then
+ arc_version="--arc_version=${CHROMEOS_ARC_VERSION}"
+ fi
+
"${GCLIENT_ROOT}/chromite/bin/cros_set_lsb_release" \
--sysroot="${root_fs_dir}" \
--board="${BOARD}" \
@@ -234,7 +243,8 @@
--branch_number="${CHROMEOS_BRANCH}" \
--build_number="${CHROMEOS_BUILD}" \
--chrome_milestone="${CHROME_BRANCH}" \
- --patch_number="${CHROMEOS_PATCH}"
+ --patch_number="${CHROMEOS_PATCH}" \
+ ${arc_version}
# Create the boot.desc file which stores the build-time configuration
# information needed for making the image bootable after creation with