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:
Michael Marineau 2013-12-01 15:05:05 -08:00
parent d3a3a88768
commit c9c1efd276
6 changed files with 17 additions and 6 deletions

View File

@ -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} \

View File

@ -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"

View File

@ -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}" \

View File

@ -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 "" \

View File

@ -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 \

View File

@ -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 \