From eb4595f1e8ee8faf85510d9504fad20675879946 Mon Sep 17 00:00:00 2001 From: Ryan Cui Date: Mon, 17 Dec 2012 14:28:42 -0800 Subject: [PATCH] setup_board: add --accept_license flag. Setting the flag will cause make.conf to set the ACCEPT_LICENSE environment variable. BUG=chromium-os:37312 TEST=remote trybots Change-Id: Id478b7cfb8c37d363da46b1d74f33143e8ea159f Reviewed-on: https://gerrit.chromium.org/gerrit/39801 Reviewed-by: David James Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger --- build_packages | 5 +++++ setup_board | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/build_packages b/build_packages index 024074be1b..6599584536 100755 --- a/build_packages +++ b/build_packages @@ -42,6 +42,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_string accept_licenses "" \ + "Licenses to append to the accept list." DEFINE_boolean fast "${DEFAULT_FAST}" \ "Call many emerges in parallel." DEFINE_integer jobs -1 \ @@ -88,6 +90,9 @@ CHROMITE_BIN="${GCLIENT_ROOT}/chromite/bin" # Before we can run any tools, we need to update chroot or setup_board. UPDATE_ARGS=() +if [[ -n ${FLAGS_accept_licenses} ]]; then + UPDATE_ARGS+=( --accept_licenses "${FLAGS_accept_licenses}" ) +fi if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then UPDATE_ARGS+=( --fast ) else diff --git a/setup_board b/setup_board index 1fe9ada76c..58a10277aa 100755 --- a/setup_board +++ b/setup_board @@ -33,6 +33,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_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" @@ -174,6 +176,10 @@ print_board_make_conf() { echo FETCHCOMMAND_GS="\"bash -c 'BOTO_CONFIG=$boto_config $gsutil_cmd'\"" echo RESUMECOMMAND_GS='"$FETCHCOMMAND_GS"' echo + if [[ -n ${FLAGS_accept_licenses} ]]; then + echo "ACCEPT_LICENSE='${FLAGS_accept_licenses}'" + echo + fi } print_binhost_config() {