Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: src/scripts/build_image

Issue 1564035: Retry on build_image failures and make sbt more aggressive by default (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/scripts/sync_build_test.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_image
diff --git a/src/scripts/build_image b/src/scripts/build_image
index 722a8ef62b9ca0f604bb8b62f403e47984917011..25dde2686bfd695981b69db95315164afb943db7 100755
--- a/src/scripts/build_image
+++ b/src/scripts/build_image
@@ -35,6 +35,8 @@ DEFINE_boolean installmask $FLAGS_TRUE \
"Use INSTALL_MASK to shrink the resulting image."
DEFINE_integer jobs -1 \
"How many packages to build in parallel at maximum."
+DEFINE_integer retries -1 \
+ "On image mastering failure, the number of times to retry"
DEFINE_boolean statefuldev $FLAGS_FALSE \
"Install development packages on stateful partition rather than the rootfs"
DEFINE_string to "" \
@@ -283,6 +285,11 @@ fi
if [[ $FLAGS_jobs -ne -1 ]]; then
EMERGE_JOBS="--jobs=$FLAGS_jobs"
+ if [[ $FLAGS_retries -eq -1 ]]; then
+ # The jobs flag can be flaky. Retry once by default,
+ # without the jobs flag.
+ FLAGS_retries=1
+ fi
fi
# Prepare stateful partition with some pre-created directories
@@ -305,7 +312,7 @@ sudo mount --bind "${STATEFUL_DIR}/var" "${ROOT_FS_DIR}/var"
# runtime packages for chrome os. This builds up a chrome os image from binary
# packages with runtime dependencies only. We use INSTALL_MASK to trim the
# image size as much as possible.
-sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
+eretry sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
--root="$ROOT_FS_DIR" --root-deps=rdeps \
--usepkgonly chromeos $EMERGE_JOBS
@@ -315,7 +322,7 @@ ROOT_DEV_DIR="$ROOT_FS_DIR"
# Install development packages.
if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]] ; then
- sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
+ eretry sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
--root="$ROOT_DEV_DIR" --root-deps=rdeps \
--usepkgonly chromeos-dev $EMERGE_JOBS
@@ -324,14 +331,14 @@ if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]] ; then
fi
if [ -n "$FLAGS_factory_server" ]; then
- sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
+ eretry sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
--root="$ROOT_DEV_DIR" --root-deps=rdeps \
--usepkgonly chromeos-factoryinstall $EMERGE_JOBS
fi
# Install packages required for testing.
if [[ $FLAGS_withtest -eq $FLAGS_TRUE ]] ; then
- sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
+ eretry sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
--root="$ROOT_DEV_DIR" --root-deps=rdeps \
--usepkgonly chromeos-test $EMERGE_JOBS
fi
« no previous file with comments | « no previous file | src/scripts/sync_build_test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698