From debaa3d8cf1cfcbcc77b2f44729f6e7f83625ca1 Mon Sep 17 00:00:00 2001 From: Chris Masone Date: Thu, 8 Jul 2010 21:10:23 -0700 Subject: [PATCH] Revert "Use --fast by default in build_image when --jobs is enabled." This reverts commit f0fb864e8df91551daeb3a10a650c6f4751425ca. This change needs to be reverted because it suppresses logging output from the build process. Thus, when something goes wrong...the sherriff is left completely helpless in terms of debugging the issue. TBR: davidjames@chromium.org --- build_image | 9 ++++----- common.sh | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build_image b/build_image index 7b9abc7f18..9b94d99c56 100755 --- a/build_image +++ b/build_image @@ -92,11 +92,6 @@ if [ "${FLAGS_rootfs_size}" -gt "${FLAGS_rootfs_partition_size}" ] ; then exit 1 fi -if [ ${FLAGS_jobs} -ne -1 ]; then - EMERGE_JOBS="--jobs=${FLAGS_jobs}" - FLAGS_fast=${FLAGS_TRUE} -fi - EMERGE_BOARD_CMD="emerge-${FLAGS_board}" if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then echo "Using alternate emerge" @@ -166,6 +161,10 @@ if [[ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]] ; then INSTALL_MASK="${INSTALL_MASK} ${FACTORY_INSTALL_MASK}" fi +if [[ ${FLAGS_jobs} -ne -1 ]]; then + EMERGE_JOBS="--jobs=${FLAGS_jobs}" +fi + # Figure out ARCH from the given toolchain. # TODO: Move to common.sh as a function after scripts are switched over. TC_ARCH=$(echo "${CHOST}" | awk -F'-' '{ print $1 }') diff --git a/common.sh b/common.sh index 446be805ed..262895be69 100644 --- a/common.sh +++ b/common.sh @@ -325,13 +325,14 @@ function die { } # Retry an emerge command according to $FLAGS_retries +# The $EMERGE_JOBS flags will only be added the first time the command is run function eretry () { - $* && return 0 local i= for i in $(seq $FLAGS_retries); do echo Retrying $* - $* && return 0 + $* $EMERGE_JOBS && return 0 done + $* && return 0 return 1 }