From 839e82adc8729d79cb580f181a6192cab12e361b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 1 Mar 2012 14:22:10 -0500 Subject: [PATCH] build_packages: add --skip_chroot_upgrade for setup_board Now that the setup_board has an option for skipping the chroot update logic, it'd be helpful (for buildbots) if build_packages had a flag to pass through to setup_board for that too. BUG=None TEST=`./build_packages --board=tegra2` ran the chroot update TEST=`./build_packages --board=tegra2 --skip_chroot_upgrade` skipped the chroot update Change-Id: I662d90811d7bcf9782ef8cb06655940b0e5c7f06 Reviewed-on: https://gerrit.chromium.org/gerrit/17159 Reviewed-by: David James Tested-by: Mike Frysinger Commit-Ready: Mike Frysinger --- build_packages | 7 ++++++- setup_board | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build_packages b/build_packages index 402340e456..e4fb387690 100755 --- a/build_packages +++ b/build_packages @@ -72,6 +72,8 @@ DEFINE_boolean oldchromebinary "${FLAGS_FALSE}" \ "Use the last prebuilt binary for Chrome produced by the buildbot." DEFINE_boolean skip_toolchain_update "${FLAGS_FALSE}" \ "Don't update toolchain automatically." +DEFINE_boolean skip_chroot_upgrade "${FLAGS_FALSE}" \ + "Don't run the chroot upgrade automatically; use with care." # The --reuse_pkgs_from_local_boards flag tells Portage to share binary # packages between boards that are built locally, so that the total time @@ -81,7 +83,6 @@ DEFINE_boolean skip_toolchain_update "${FLAGS_FALSE}" \ DEFINE_boolean reuse_pkgs_from_local_boards $FLAGS_FALSE \ "Bootstrap from local packages instead of remote packages." - # Parse command line FLAGS_HELP="usage: $0 [flags]" FLAGS "$@" || exit 1 @@ -150,6 +151,10 @@ fi if [ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_TRUE}" ]; then UPDATE_ARGS+=" --skip_toolchain_update" fi +if [ "${FLAGS_skip_chroot_upgrade}" -eq "${FLAGS_TRUE}" ]; then + UPDATE_ARGS+=" --skip_chroot_upgrade" +fi + ${SCRIPTS_DIR}/setup_board --quiet --board=${FLAGS_board} ${UPDATE_ARGS} if [ "${FLAGS_noworkon}" -eq "${FLAGS_FALSE}" ]; then diff --git a/setup_board b/setup_board index 406e23115b..6949a01aa0 100755 --- a/setup_board +++ b/setup_board @@ -70,9 +70,7 @@ DEFINE_boolean skip_toolchain_update $FLAGS_FALSE \ DEFINE_integer jobs -1 \ "How many packages to build in parallel at maximum." DEFINE_boolean skip_chroot_upgrade $FLAGS_FALSE \ - "Don't run the chroot upgrade automatically. \ -This should only be called by version hook scripts that need to call \ -setup_board." + "Don't run the chroot upgrade automatically; use with care." # The --reuse_pkgs_from_local_boards flag tells Portage to share binary # packages between boards that are built locally, so that the total time