tools: remove support for parallel_emerge

Using parallel_emerge has been disabled by default for all commands
except build_image for quite a while now, build_image kept it just
because it was still a bit faster than normal emerge. Keeping
parallel_emerge complicates future changes to build_image so it needs to
drop it entirely. Since that means nothing uses it by default we might
as well just rip out support for it entirely.
This commit is contained in:
Michael Marineau 2014-07-19 16:32:26 -07:00
parent 3d8948d91f
commit 4d3c198161
7 changed files with 3 additions and 57 deletions

View File

@ -62,8 +62,6 @@ show_help_if_requested "$@"
# not needed for the typical developer workflow. # not needed for the typical developer workflow.
DEFINE_integer build_attempt 1 \ DEFINE_integer build_attempt 1 \
"The build attempt for this image build." "The build attempt for this image build."
DEFINE_boolean fast ${FLAGS_TRUE} \
"Use the parallel_emerge wrapper script."
DEFINE_integer jobs "${NUM_JOBS}" \ DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum." "How many packages to build in parallel at maximum."
DEFINE_boolean replace ${FLAGS_FALSE} \ DEFINE_boolean replace ${FLAGS_FALSE} \

View File

@ -102,11 +102,7 @@ emerge_to_image() {
test -n "$mask" || die "PROD_INSTALL_MASK not defined" test -n "$mask" || die "PROD_INSTALL_MASK not defined"
local emerge_cmd local emerge_cmd
if [[ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]]; then
emerge_cmd="$GCLIENT_ROOT/chromite/bin/parallel_emerge --board=$BOARD"
else
emerge_cmd="emerge-$BOARD" emerge_cmd="emerge-$BOARD"
fi
emerge_cmd+=" --root-deps=rdeps --usepkgonly -v" emerge_cmd+=" --root-deps=rdeps --usepkgonly -v"
if [[ $FLAGS_jobs -ne -1 ]]; then if [[ $FLAGS_jobs -ne -1 ]]; then

View File

@ -20,10 +20,6 @@ DEFINE_boolean getbinpkg "${FLAGS_TRUE}" \
"Download binary packages from remote repository." "Download binary packages from remote repository."
DEFINE_boolean noworkon "${FLAGS_FALSE}" \ DEFINE_boolean noworkon "${FLAGS_FALSE}" \
"Don't force-build workon packages." "Don't force-build workon packages."
DEFINE_boolean showoutput "${FLAGS_FALSE}" \
"Show all output from parallel_emerge."
DEFINE_boolean withautotest "${FLAGS_TRUE}" \
"Build autotest client code."
DEFINE_boolean fetchonly "${FLAGS_FALSE}" \ DEFINE_boolean fetchonly "${FLAGS_FALSE}" \
"Don't build anything, instead only fetch what is needed." "Don't build anything, instead only fetch what is needed."
@ -39,8 +35,6 @@ up by the build_image script to put together a bootable Chrome OS image.
If [packages] are specified, only build those specific packages (and any If [packages] are specified, only build those specific packages (and any
dependencies they might need). dependencies they might need).
For the fastest builds, use --nowithautotest --noworkon.
" "
show_help_if_requested "$@" show_help_if_requested "$@"
@ -53,8 +47,6 @@ DEFINE_boolean toolchainpkgonly $FLAGS_FALSE \
"Use binary packages only for the board toolchain." "Use binary packages only for the board toolchain."
DEFINE_string accept_licenses "" \ DEFINE_string accept_licenses "" \
"Licenses to append to the accept list." "Licenses to append to the accept list."
DEFINE_boolean fast "${DEFAULT_FAST}" \
"Use the parallel_emerge wrapper script."
DEFINE_integer jobs "${NUM_JOBS}" \ DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum." "How many packages to build in parallel at maximum."
DEFINE_boolean norebuild "${FLAGS_FALSE}" \ DEFINE_boolean norebuild "${FLAGS_FALSE}" \
@ -93,11 +85,6 @@ UPDATE_ARGS=( --regen_configs )
if [[ -n ${FLAGS_accept_licenses} ]]; then if [[ -n ${FLAGS_accept_licenses} ]]; then
UPDATE_ARGS+=( --accept_licenses "${FLAGS_accept_licenses}" ) UPDATE_ARGS+=( --accept_licenses "${FLAGS_accept_licenses}" )
fi fi
if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then
UPDATE_ARGS+=( --fast )
else
UPDATE_ARGS+=( --nofast )
fi
if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then
UPDATE_ARGS+=( --usepkg ) UPDATE_ARGS+=( --usepkg )
if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then
@ -138,15 +125,7 @@ fi
# Setup all the emerge command/flags. # Setup all the emerge command/flags.
EMERGE_FLAGS=( -uDNv --backtrack=30 --select ) EMERGE_FLAGS=( -uDNv --backtrack=30 --select )
EMERGE_CMD=( "emerge-${FLAGS_board}" )
if [[ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]]; then
EMERGE_CMD=(
"${CHROMITE_BIN}/parallel_emerge"
--board=${FLAGS_board}
)
else
EMERGE_CMD=( "emerge-${FLAGS_board}" )
fi
if [[ "${FLAGS_fetchonly}" -eq "${FLAGS_TRUE}" ]]; then if [[ "${FLAGS_fetchonly}" -eq "${FLAGS_TRUE}" ]]; then
EMERGE_CMD+=( --fetchonly ) EMERGE_CMD+=( --fetchonly )
fi fi
@ -174,11 +153,6 @@ fi
if [[ "${FLAGS_norebuild}" -eq "${FLAGS_FALSE}" ]]; then if [[ "${FLAGS_norebuild}" -eq "${FLAGS_FALSE}" ]]; then
EMERGE_FLAGS+=( --rebuild-if-unbuilt ) EMERGE_FLAGS+=( --rebuild-if-unbuilt )
fi fi
if [[ "${FLAGS_showoutput}" -eq "${FLAGS_TRUE}" && \
"${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]]; then
# Only parallel_emerge supports --show-output.
EMERGE_FLAGS+=( --show-output )
fi
# Build cros_workon packages when they are changed. # Build cros_workon packages when they are changed.
CROS_WORKON_PKGS=() CROS_WORKON_PKGS=()

View File

@ -390,9 +390,6 @@ if [[ -f ${GCLIENT_ROOT}/src/scripts/.default_board ]]; then
fi fi
fi fi
# Disable --fast in most commands
DEFAULT_FAST=${FLAGS_FALSE}
# Directory to store built images. Should be set by sourcing script when used. # Directory to store built images. Should be set by sourcing script when used.
BUILD_DIR= BUILD_DIR=

View File

@ -40,8 +40,6 @@ DEFINE_boolean getbinpkg $FLAGS_TRUE \
"Download binary packages from remote repository." "Download binary packages from remote repository."
DEFINE_boolean delete $FLAGS_FALSE "Delete an existing chroot." DEFINE_boolean delete $FLAGS_FALSE "Delete an existing chroot."
DEFINE_boolean replace $FLAGS_FALSE "Overwrite existing chroot, if any." DEFINE_boolean replace $FLAGS_FALSE "Overwrite existing chroot, if any."
DEFINE_boolean fast "${DEFAULT_FAST}" \
"Use the parallel_emerge wrapper script."
DEFINE_integer jobs "${NUM_JOBS}" \ DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum." "How many packages to build in parallel at maximum."
DEFINE_string stage3_path "" \ DEFINE_string stage3_path "" \
@ -358,11 +356,6 @@ if [[ ${FLAGS_usepkg} -eq ${FLAGS_TRUE} ]]; then
else else
UPDATE_ARGS+=( --nousepkg ) UPDATE_ARGS+=( --nousepkg )
fi fi
if [[ ${FLAGS_fast} -eq ${FLAGS_TRUE} ]]; then
UPDATE_ARGS+=( --fast )
else
UPDATE_ARGS+=( --nofast )
fi
if [[ "${FLAGS_jobs}" -ne -1 ]]; then if [[ "${FLAGS_jobs}" -ne -1 ]]; then
UPDATE_ARGS+=( --jobs=${FLAGS_jobs} ) UPDATE_ARGS+=( --jobs=${FLAGS_jobs} )
fi fi

View File

@ -37,8 +37,6 @@ DEFINE_string getbinpkgver "" \
"Use binary packages from a specific version." "Use binary packages from a specific version."
DEFINE_boolean toolchainpkgonly $FLAGS_FALSE \ DEFINE_boolean toolchainpkgonly $FLAGS_FALSE \
"Use binary packages only for the board toolchain." "Use binary packages only for the board toolchain."
DEFINE_boolean fast "${DEFAULT_FAST}" \
"Use the parallel_emerge wrapper script."
DEFINE_integer jobs "${NUM_JOBS}" \ DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum." "How many packages to build in parallel at maximum."
DEFINE_boolean latest_toolchain $FLAGS_FALSE \ DEFINE_boolean latest_toolchain $FLAGS_FALSE \
@ -140,11 +138,6 @@ get_board_and_variant $FLAGS_board $FLAGS_variant
# Before we can run any tools, we need to update chroot # Before we can run any tools, we need to update chroot
UPDATE_ARGS="--toolchain_boards=${BOARD}" UPDATE_ARGS="--toolchain_boards=${BOARD}"
if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then
UPDATE_ARGS+=" --fast"
else
UPDATE_ARGS+=" --nofast"
fi
if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then
UPDATE_ARGS+=" --usepkg" UPDATE_ARGS+=" --usepkg"
if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then

View File

@ -28,8 +28,6 @@ show_help_if_requested "$@"
# The following options are advanced options, only available to those willing # The following options are advanced options, only available to those willing
# to read the source code. They are not shown in help output, since they are # to read the source code. They are not shown in help output, since they are
# not needed for the typical developer workflow. # not needed for the typical developer workflow.
DEFINE_boolean fast ${DEFAULT_FAST} \
"Use the parallel_emerge wrapper script."
DEFINE_integer jobs "${NUM_JOBS}" \ DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum." "How many packages to build in parallel at maximum."
DEFINE_boolean skip_toolchain_update $FLAGS_FALSE \ DEFINE_boolean skip_toolchain_update $FLAGS_FALSE \
@ -148,10 +146,6 @@ fi
# Perform an update of coreos-devel/sdk-depends and world in the chroot. # Perform an update of coreos-devel/sdk-depends and world in the chroot.
EMERGE_CMD="emerge" EMERGE_CMD="emerge"
CHROMITE_BIN="${GCLIENT_ROOT}/chromite/bin"
if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then
EMERGE_CMD="${CHROMITE_BIN}/parallel_emerge"
fi
# In first pass, update portage and toolchains. Lagged updates of both # In first pass, update portage and toolchains. Lagged updates of both
# can cause serious issues later. # can cause serious issues later.
@ -175,6 +169,7 @@ if [[ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_FALSE}" && \
fi fi
# Build cros_workon packages when they are changed. # Build cros_workon packages when they are changed.
CHROMITE_BIN="${GCLIENT_ROOT}/chromite/bin"
for pkg in $("${CHROMITE_BIN}/cros_list_modified_packages" --host); do for pkg in $("${CHROMITE_BIN}/cros_list_modified_packages" --host); do
EMERGE_FLAGS+=" --reinstall-atoms=${pkg} --usepkg-exclude=${pkg}" EMERGE_FLAGS+=" --reinstall-atoms=${pkg} --usepkg-exclude=${pkg}"
done done