From 7a40158fd7e39754cd9b5c5dec73ecd78b15b908 Mon Sep 17 00:00:00 2001 From: Ryan Cui Date: Mon, 3 Dec 2012 15:48:28 -0800 Subject: [PATCH] setup_board: fix --regen_config bug. https://gerrit.chromium.org/gerrit/#/c/38156 introduced a bug where cross_get_version was moved to install_toolchain but was still used in setup_board. setup_board now saves whatever toolchain version is currently configured and appends that information to the newly generated board config. BUG=chromium-os:36865 TEST=remote trybot. manual - test case of existence/nonexistence of board config file and existence/nonexistence of previous toolchain info. Change-Id: I20e1794c12e7e60fdbbcd5a123ddc5c6bdf86b16 Reviewed-on: https://gerrit.chromium.org/gerrit/39132 Reviewed-by: Mike Frysinger Commit-Ready: Ryan Cui Tested-by: Ryan Cui --- setup_board | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup_board b/setup_board index 08ab398b7c..1fe9ada76c 100755 --- a/setup_board +++ b/setup_board @@ -389,6 +389,11 @@ cmds+=( ) sudo_multi "${cmds[@]}" +SAVED_VERSION= +if [[ ${FLAGS_regen_configs} -eq ${FLAGS_TRUE} ]]; then + SAVED_VERSION=$(grep -s ^LIBC_VERSION= ${BOARD_SETUP} || true) +fi + sudo_clobber "${BOARD_SETUP}" <