From 8dce277ebfb228ca49ce49f3d3b17b44bf068125 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:08:02 +0000 Subject: [PATCH] Bump third_party/pigweed/repo from `5eccd87` to `5d8f62a` (#30571) * Bump third_party/pigweed/repo from `5eccd87` to `5d8f62a` Bumps [third_party/pigweed/repo](https://github.com/google/pigweed) from `5eccd87` to `5d8f62a`. - [Commits](https://github.com/google/pigweed/compare/5eccd87a773568f5db5f5e7f1dd0809860f3d01e...5d8f62aff08aa9f3a7333943a1052b418784cbfd) --- updated-dependencies: - dependency-name: third_party/pigweed/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Undo env patching for examples - pigweed can do this now * Remove absolute path patching --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Litvin --- .../build_overrides/pigweed_environment.gni | 34 ------------ scripts/setup/bootstrap.sh | 9 ---- scripts/setup/gni_make_paths_absolute.py | 54 ------------------- third_party/pigweed/repo | 2 +- 4 files changed, 1 insertion(+), 98 deletions(-) delete mode 100755 scripts/setup/gni_make_paths_absolute.py diff --git a/examples/build_overrides/pigweed_environment.gni b/examples/build_overrides/pigweed_environment.gni index 538e35fca20efc..bf8dc3cc9dacc5 100644 --- a/examples/build_overrides/pigweed_environment.gni +++ b/examples/build_overrides/pigweed_environment.gni @@ -19,37 +19,3 @@ _bootstrap_root = "//third_party/connectedhomeip" import("${_bootstrap_root}/build_overrides/pigweed_environment.gni") -# Rebase paths to our root. -# This rebasing is only done if the paths are repo-relative -# (i.e. start with "//") -if (defined(pw_env_setup_CIPD_ARM)) { - _split_CIPD_ARM = string_split(pw_env_setup_CIPD_ARM, "//") - if (_split_CIPD_ARM[0] == "") { - pw_env_setup_CIPD_ARM = - get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_ARM}", "abspath") - } -} -if (defined(pw_env_setup_CIPD_PIGWEED)) { - _split_CIPD_PIGWEED = string_split(pw_env_setup_CIPD_PIGWEED, "//") - if (_split_CIPD_PIGWEED[0] == "") { - pw_env_setup_CIPD_PIGWEED = - get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PIGWEED}", - "abspath") - } -} -if (defined(pw_env_setup_CIPD_PYTHON)) { - _split_CIPD_PYTHON = string_split(pw_env_setup_CIPD_PYTHON, "//") - if (_split_CIPD_PYTHON[0] == "") { - pw_env_setup_CIPD_PYTHON = - get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PYTHON}", - "abspath") - } -} -if (defined(pw_env_setup_VIRTUAL_ENV)) { - _split_VIRTUAL_ENV = string_split(pw_env_setup_VIRTUAL_ENV, "//") - if (_split_VIRTUAL_ENV[0] == "") { - pw_env_setup_VIRTUAL_ENV = - get_path_info("${_bootstrap_root}/${pw_env_setup_VIRTUAL_ENV}", - "abspath") - } -} diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index eda6e97ad9c9bd..1b813216222efe 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -165,15 +165,6 @@ if [ -n "$BASH" ]; then . "$_CHIP_ROOT/scripts/helpers/bash-completion.sh" fi -# Update relative paths to absolute (if they exist) -# to make sure loading of paths works in build_examples -# -# See https://github.com/project-chip/connectedhomeip/issues/30475 -# for details -scripts/setup/gni_make_paths_absolute.py \ - --root "$_CHIP_ROOT" \ - build_overrides/pigweed_environment.gni - unset -f _bootstrap_or_activate unset -f _install_additional_pip_requirements diff --git a/scripts/setup/gni_make_paths_absolute.py b/scripts/setup/gni_make_paths_absolute.py deleted file mode 100755 index 17f03820458bba..00000000000000 --- a/scripts/setup/gni_make_paths_absolute.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import argparse - - -def _make_paths_absolute(gni_file: str, root: str): - with open(gni_file, "rt", encoding="utf8") as f: - data = f.read() - - # Data will contain key/value pairs like: - # pw_env_setup_CIPD_PIGWEED = "//../home/vscode/pigweed/env/cipd/packages/pigweed" - # - # Looking to replace relative paths (starting with "//../") - # to absolute paths from the root - if not root.endswith("/"): - root = root + "/" - - new_data = data.replace('"//../', f'"{root}../') - - if new_data == data: - return - - with open(gni_file, "wt", encoding="utf8") as f: - f.write(new_data) - - -def main(): - parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.ArgumentDefaultsHelpFormatter, - ) - parser.add_argument( - '--root', '-r', required=True, - help="Set the root used by the build (usually CHIP_ROOT)" - ) - parser.add_argument('gni_file', type=str, help="GNI file to process") - _make_paths_absolute(**vars(parser.parse_args())) - - -if __name__ == '__main__': - main() diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 5eccd87a773568..5d8f62aff08aa9 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 5eccd87a773568f5db5f5e7f1dd0809860f3d01e +Subproject commit 5d8f62aff08aa9f3a7333943a1052b418784cbfd