mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 06:01:41 +02:00
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:
parent
3d8948d91f
commit
4d3c198161
@ -62,8 +62,6 @@ show_help_if_requested "$@"
|
||||
# not needed for the typical developer workflow.
|
||||
DEFINE_integer build_attempt 1 \
|
||||
"The build attempt for this image build."
|
||||
DEFINE_boolean fast ${FLAGS_TRUE} \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs "${NUM_JOBS}" \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean replace ${FLAGS_FALSE} \
|
||||
|
@ -102,11 +102,7 @@ emerge_to_image() {
|
||||
test -n "$mask" || die "PROD_INSTALL_MASK not defined"
|
||||
|
||||
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"
|
||||
fi
|
||||
emerge_cmd+=" --root-deps=rdeps --usepkgonly -v"
|
||||
|
||||
if [[ $FLAGS_jobs -ne -1 ]]; then
|
||||
|
@ -20,10 +20,6 @@ DEFINE_boolean getbinpkg "${FLAGS_TRUE}" \
|
||||
"Download binary packages from remote repository."
|
||||
DEFINE_boolean noworkon "${FLAGS_FALSE}" \
|
||||
"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}" \
|
||||
"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
|
||||
dependencies they might need).
|
||||
|
||||
For the fastest builds, use --nowithautotest --noworkon.
|
||||
"
|
||||
show_help_if_requested "$@"
|
||||
|
||||
@ -53,8 +47,6 @@ DEFINE_boolean toolchainpkgonly $FLAGS_FALSE \
|
||||
"Use binary packages only for the board toolchain."
|
||||
DEFINE_string accept_licenses "" \
|
||||
"Licenses to append to the accept list."
|
||||
DEFINE_boolean fast "${DEFAULT_FAST}" \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs "${NUM_JOBS}" \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean norebuild "${FLAGS_FALSE}" \
|
||||
@ -93,11 +85,6 @@ UPDATE_ARGS=( --regen_configs )
|
||||
if [[ -n ${FLAGS_accept_licenses} ]]; then
|
||||
UPDATE_ARGS+=( --accept_licenses "${FLAGS_accept_licenses}" )
|
||||
fi
|
||||
if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then
|
||||
UPDATE_ARGS+=( --fast )
|
||||
else
|
||||
UPDATE_ARGS+=( --nofast )
|
||||
fi
|
||||
if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then
|
||||
UPDATE_ARGS+=( --usepkg )
|
||||
if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
@ -138,15 +125,7 @@ fi
|
||||
|
||||
# Setup all the emerge command/flags.
|
||||
EMERGE_FLAGS=( -uDNv --backtrack=30 --select )
|
||||
|
||||
if [[ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
EMERGE_CMD=(
|
||||
"${CHROMITE_BIN}/parallel_emerge"
|
||||
--board=${FLAGS_board}
|
||||
)
|
||||
else
|
||||
EMERGE_CMD=( "emerge-${FLAGS_board}" )
|
||||
fi
|
||||
EMERGE_CMD=( "emerge-${FLAGS_board}" )
|
||||
if [[ "${FLAGS_fetchonly}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
EMERGE_CMD+=( --fetchonly )
|
||||
fi
|
||||
@ -174,11 +153,6 @@ fi
|
||||
if [[ "${FLAGS_norebuild}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
EMERGE_FLAGS+=( --rebuild-if-unbuilt )
|
||||
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.
|
||||
CROS_WORKON_PKGS=()
|
||||
|
@ -390,9 +390,6 @@ if [[ -f ${GCLIENT_ROOT}/src/scripts/.default_board ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable --fast in most commands
|
||||
DEFAULT_FAST=${FLAGS_FALSE}
|
||||
|
||||
# Directory to store built images. Should be set by sourcing script when used.
|
||||
BUILD_DIR=
|
||||
|
||||
|
@ -40,8 +40,6 @@ DEFINE_boolean getbinpkg $FLAGS_TRUE \
|
||||
"Download binary packages from remote repository."
|
||||
DEFINE_boolean delete $FLAGS_FALSE "Delete an existing chroot."
|
||||
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}" \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_string stage3_path "" \
|
||||
@ -358,11 +356,6 @@ if [[ ${FLAGS_usepkg} -eq ${FLAGS_TRUE} ]]; then
|
||||
else
|
||||
UPDATE_ARGS+=( --nousepkg )
|
||||
fi
|
||||
if [[ ${FLAGS_fast} -eq ${FLAGS_TRUE} ]]; then
|
||||
UPDATE_ARGS+=( --fast )
|
||||
else
|
||||
UPDATE_ARGS+=( --nofast )
|
||||
fi
|
||||
if [[ "${FLAGS_jobs}" -ne -1 ]]; then
|
||||
UPDATE_ARGS+=( --jobs=${FLAGS_jobs} )
|
||||
fi
|
||||
|
@ -37,8 +37,6 @@ DEFINE_string getbinpkgver "" \
|
||||
"Use binary packages from a specific version."
|
||||
DEFINE_boolean toolchainpkgonly $FLAGS_FALSE \
|
||||
"Use binary packages only for the board toolchain."
|
||||
DEFINE_boolean fast "${DEFAULT_FAST}" \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs "${NUM_JOBS}" \
|
||||
"How many packages to build in parallel at maximum."
|
||||
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
|
||||
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
|
||||
UPDATE_ARGS+=" --usepkg"
|
||||
if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
|
@ -28,8 +28,6 @@ show_help_if_requested "$@"
|
||||
# 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
|
||||
# not needed for the typical developer workflow.
|
||||
DEFINE_boolean fast ${DEFAULT_FAST} \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs "${NUM_JOBS}" \
|
||||
"How many packages to build in parallel at maximum."
|
||||
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.
|
||||
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
|
||||
# can cause serious issues later.
|
||||
@ -175,6 +169,7 @@ if [[ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_FALSE}" && \
|
||||
fi
|
||||
|
||||
# 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
|
||||
EMERGE_FLAGS+=" --reinstall-atoms=${pkg} --usepkg-exclude=${pkg}"
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user