base_image_util.sh: probe unibuild based on presence of /usr/share/chromeos-config

JSON config is dead and being removed in CL:2065957. Drop this code
which requires the JSON config.

This was only ever used for specifying CHROMEOS_RELEASE_UNIBUILD=1 in
the lsb_release, so we never actually needed the list of supported
model names anyway.

BUG=chromium:1054199
TEST=build_image for unibuild, lsb_release contains
     CHROMEOS_RELEASE_UNIBUILD=1

Cq-Depend: chromium:2078954
Change-Id: I5f9853a1966c0cff792dc09ded298ae7c30aa40c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2078934
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh
index 3fc7a4f..1f82b08 100755
--- a/build_library/base_image_util.sh
+++ b/build_library/base_image_util.sh
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-CHROMEOS_MASTER_JSON_CONFIG_FILE="${BOARD_ROOT}/usr/share/chromeos-config/config.json"
+CHROMEOS_CONFIG_DIR="${BOARD_ROOT}/usr/share/chromeos-config"
 
 check_full_disk() {
   local prev_ret=$?
@@ -339,18 +339,15 @@
     builder_path="--builder_path=${FLAGS_builder_path}"
   fi
 
-  # For unified builds, include a list of models, e.g. with --models "reef pyro"
-  local model_flags=()
-  if [[ -f "${CHROMEOS_MASTER_JSON_CONFIG_FILE}" ]]; then
-    models=$(grep '"name":' "${CHROMEOS_MASTER_JSON_CONFIG_FILE}" \
-      | uniq | sed -e 's/.*"name": "\(.*\)".*/\1/' | tr '\n' ' ')
-    [[ -n "${models}" ]] && model_flags+=( --models "${models%% }" )
+  local unibuild_flag=
+  if [[ -d "${CHROMEOS_CONFIG_DIR}" ]]; then
+    unibuild_flag="--unibuild"
   fi
 
   "${CHROMITE_BIN}/cros_set_lsb_release" \
     --sysroot="${root_fs_dir}" \
     --board="${BOARD}" \
-    "${model_flags[@]}" \
+    ${unibuild_flag} \
     ${builder_path} \
     --keyset="devkeys" \
     --version_string="${CHROMEOS_VERSION_STRING}" \