mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
fix(build_image): Add --fast to control use of parallel_emerge
This makes it possible to toggle parallel_emerge just as other scripts do. In other scripts update the help string to be more specific, the --jobs option can be used to control parallelism.
This commit is contained in:
parent
d3a3a88768
commit
c9c1efd276
@ -49,6 +49,8 @@ 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 "${DEFAULT_FAST}" \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs -1 \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean replace ${FLAGS_FALSE} \
|
||||
|
||||
@ -133,8 +133,14 @@ generate_au_zip () {
|
||||
emerge_to_image() {
|
||||
local mask="${INSTALL_MASK:-$(portageq-$BOARD envvar PROD_INSTALL_MASK)}"
|
||||
test -n "$mask" || die "PROD_INSTALL_MASK not defined"
|
||||
local emerge_cmd="$GCLIENT_ROOT/chromite/bin/parallel_emerge"
|
||||
emerge_cmd+=" --board=$BOARD --root-deps=rdeps --usepkgonly -v"
|
||||
|
||||
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
|
||||
emerge_cmd+=" --jobs=$FLAGS_jobs"
|
||||
|
||||
@ -50,7 +50,7 @@ show_help_if_requested "$@"
|
||||
DEFINE_string accept_licenses "" \
|
||||
"Licenses to append to the accept list."
|
||||
DEFINE_boolean fast "${DEFAULT_FAST}" \
|
||||
"Call many emerges in parallel."
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs -1 \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean norebuild "${FLAGS_FALSE}" \
|
||||
|
||||
@ -41,7 +41,8 @@ DEFINE_boolean getbinpkg $FLAGS_TRUE \
|
||||
DEFINE_boolean delete $FLAGS_FALSE "Delete an existing chroot."
|
||||
DEFINE_boolean replace $FLAGS_FALSE "Overwrite existing chroot, if any."
|
||||
DEFINE_integer jobs -1 "How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean fast ${DEFAULT_FAST} "Call many emerges in parallel"
|
||||
DEFINE_boolean fast "${DEFAULT_FAST}" \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_string stage3_date "20130130" \
|
||||
"Use the stage3 with the given date."
|
||||
DEFINE_string stage3_path "" \
|
||||
|
||||
@ -37,7 +37,8 @@ DEFINE_string accept_licenses "" \
|
||||
"Licenses to append to the accept list."
|
||||
DEFINE_string board_overlay "" \
|
||||
"Location of the board overlay."
|
||||
DEFINE_boolean fast ${DEFAULT_FAST} "Call many emerges in parallel"
|
||||
DEFINE_boolean fast "${DEFAULT_FAST}" \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs -1 \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean latest_toolchain $FLAGS_FALSE \
|
||||
|
||||
@ -28,7 +28,8 @@ 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} "Call many emerges in parallel"
|
||||
DEFINE_boolean fast ${DEFAULT_FAST} \
|
||||
"Use the parallel_emerge wrapper script."
|
||||
DEFINE_integer jobs -1 \
|
||||
"How many packages to build in parallel at maximum."
|
||||
DEFINE_boolean skip_toolchain_update $FLAGS_FALSE \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user