build_image: remove image and package to emerge logic

The pristine image to be built and the base package to emerge
determination is done by python script. So remove the redundant logic in
shell script.

BUG=b:233789578
TEST=build_image --board betty

Cq-Depend: chromium:3688384
Change-Id: I47778c6739504452c5ed4e56cf511e4194a5d00e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3688386
Commit-Queue: Ram Chandrasekar <rchandrasekar@google.com>
Reviewed-by: Cindy Lin <xcl@google.com>
Auto-Submit: Ram Chandrasekar <rchandrasekar@google.com>
Tested-by: Ram Chandrasekar <rchandrasekar@google.com>
diff --git a/build_image.sh b/build_image.sh
index 9ab7c94..79b6096 100755
--- a/build_image.sh
+++ b/build_image.sh
@@ -102,18 +102,6 @@
 # Parse command line.
 FLAGS "$@" || exit 1
 
-# See if we want to default the bootcache flag before we clobber
-# the user's command line.  We want to default to false if the
-# user explicitly disabled rootfs verification otherwise they
-# have to manually specify both.
-FLAGS_bootcache_use_board_default=${FLAGS_enable_rootfs_verification}
-case " $* " in
-  *" --enable_bootcache "*|\
-  *" --noenable_bootcache "*)
-    FLAGS_bootcache_use_board_default=${FLAGS_FALSE}
-    ;;
-esac
-
 eval set -- "${FLAGS_ARGV}"
 
 # Only now can we die on error. shflags functions leak non-zero error codes,
@@ -145,35 +133,12 @@
 
 IMAGES_TO_BUILD="$*"
 
-parse_build_image_args
-
 load_board_specific_script "board_specific_setup.sh"
 
 sudo_clear_shadow_locks "/build/${FLAGS_board}"
 
 # TODO: <prebuild hook>
 
-BASE_PACKAGE="virtual/target-os"
-# Tweak flags, configure extra USE flags, and set base packages for the factory
-# install shim.
-if should_build_image "${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}"; then
-  # Add the cros_factory_install boot arg.
-  FLAGS_boot_args="${FLAGS_boot_args} cros_factory_install"
-
-  BASE_PACKAGE="virtual/target-os-factory-shim"
-fi
-
-# TODO: </prebuild hook>
-
-# If we are creating a developer image, also create a pristine image with a
-# different name.
-PRISTINE_IMAGE_NAME=
-if should_build_image "${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}"; then
-  PRISTINE_IMAGE_NAME="${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}"
-else
-  PRISTINE_IMAGE_NAME="${CHROMEOS_BASE_IMAGE_NAME}"
-fi
-
 if [[ ${FLAGS_eclean} -eq ${FLAGS_TRUE} ]]; then
   "${BOARD_ROOT}/build/bin/eclean" -d packages
 fi
diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh
index 249b99a..ec80594 100755
--- a/build_library/build_image_util.sh
+++ b/build_library/build_image_util.sh
@@ -34,16 +34,6 @@
   EMERGE_JOBS="--jobs=$FLAGS_jobs"
 fi
 
-# Look at flags to determine which image types we should build.
-parse_build_image_args() {
-  if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then
-    # For factory, force rootfs verification and bootcache off
-    FLAGS_enable_rootfs_verification=${FLAGS_FALSE}
-    FLAGS_enable_bootcache=${FLAGS_FALSE}
-    FLAGS_bootcache_use_board_default=${FLAGS_FALSE}
-  fi
-}
-
 make_salt() {
   # It is not important that the salt be cryptographically strong; it just needs
   # to be different for each release. The purpose of the salt is just to ensure