From 131680227b56e04c7341fa2ac53fa67483fb43a2 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 1 Jul 2022 05:03:30 +0200 Subject: [PATCH] Allow using no CIPD pigweed configuration when activating (#20105) * Allow to set pigweed config via environment Allow to specify custom pigweed configuration file via PW_CONFIG_FILE, e.g. PW_CONFIG_FILE=scripts/environment_no_cipd.json source scripts/bootstrap.sh This allows to use a custom pigweed config for scripts/activate.sh as well. * Disable rosetta in no_cipd config as well --- scripts/bootstrap.sh | 5 ++--- scripts/environment_no_cipd.json | 1 + scripts/no_cipd_bootstrap.sh | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 120000 scripts/no_cipd_bootstrap.sh diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 40f1620ac8f5d1..be3a2d721abd57 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -26,9 +26,8 @@ _bootstrap_or_activate() { local _CONFIG_FILE="scripts/environment.json" - if [ "$_BOOTSTRAP_NAME" = "no_cipd_bootstrap.sh" ]; then - _CONFIG_FILE="scripts/environment_no_cipd.json" - _BOOTSTRAP_NAME="bootstrap.sh" + if [ ! -z "$PW_CONFIG_FILE" ]; then + _CONFIG_FILE="$PW_CONFIG_FILE" fi if [ "$_BOOTSTRAP_NAME" = "bootstrap.sh" ] || diff --git a/scripts/environment_no_cipd.json b/scripts/environment_no_cipd.json index cc9fde6220e1c3..dbb3106f0f50b2 100644 --- a/scripts/environment_no_cipd.json +++ b/scripts/environment_no_cipd.json @@ -4,5 +4,6 @@ "gn_targets": [":python_packages.install"] }, "required_submodules": ["third_party/pigweed/repo"], + "rosetta": "never", "gni_file": "build_overrides/pigweed_environment.gni" } diff --git a/scripts/no_cipd_bootstrap.sh b/scripts/no_cipd_bootstrap.sh deleted file mode 120000 index eba538975a899f..00000000000000 --- a/scripts/no_cipd_bootstrap.sh +++ /dev/null @@ -1 +0,0 @@ -bootstrap.sh \ No newline at end of file