diff options
author | Yifan Hong <elsk@google.com> | 2023-04-18 19:24:39 +0000 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2023-04-19 23:50:15 +0000 |
commit | 067b2e10a1010789a732f5dad5b7e28031cb4480 (patch) | |
tree | 6ed1bb69575167498d9048ddd19b856da6228312 /kleaf | |
parent | 913e22036529096cca91d92e6993f73ad0d3c8f9 (diff) | |
download | build-067b2e10a1010789a732f5dad5b7e28031cb4480.tar.gz |
Revert "kleaf: Add --repo_prop argument to bazel wrapper."
This reverts commit c091a2bc022091653c2bebdbee655c59b691b26e.
Reason for revert: the repo.prop file in build bots contains $REPO_NAME not $REPO_PATH.
Change-Id: I33792d267d4065fbe26fbe8be37f1fc20bb5064c
Diffstat (limited to 'kleaf')
-rwxr-xr-x | kleaf/bazel.py | 10 | ||||
-rw-r--r-- | kleaf/workspace_status_stamp.py | 7 |
2 files changed, 2 insertions, 15 deletions
diff --git a/kleaf/bazel.py b/kleaf/bazel.py index 0f9e6226..30bbdef1 100755 --- a/kleaf/bazel.py +++ b/kleaf/bazel.py @@ -138,13 +138,6 @@ class BazelWrapper(object): parser.add_argument("--cache_dir", type=_require_absolute_path, default=absolute_cache_dir) - parser.add_argument( - "--repo_prop", - help="""Absolute path to repo.prop file, generated with """ - """`repo forall -c 'echo "$REPO_PATH $REPO_LREV"'`""", - type=_require_absolute_path, - default=None, - ) # known_args: List of arguments known by this bazel wrapper. These # are stripped from the final bazel invocation. @@ -175,9 +168,6 @@ class BazelWrapper(object): if self.known_args.make_jobs is not None: self.env["KLEAF_MAKE_JOBS"] = str(self.known_args.make_jobs) - if self.known_args.repo_prop is not None: - self.env["KLEAF_REPO_PROP"] = self.known_args.repo_prop - cache_dir_bazel_rc = f"{self.absolute_out_dir}/bazel/cache_dir.bazelrc" os.makedirs(os.path.dirname(cache_dir_bazel_rc), exist_ok=True) with open(cache_dir_bazel_rc, "w") as f: diff --git a/kleaf/workspace_status_stamp.py b/kleaf/workspace_status_stamp.py index d80610fe..55ab5a35 100644 --- a/kleaf/workspace_status_stamp.py +++ b/kleaf/workspace_status_stamp.py @@ -74,10 +74,6 @@ def list_projects(): Returns: a list of projects in the repository. """ - if "KLEAF_REPO_PROP" in os.environ: - with open(os.environ["KLEAF_REPO_PROP"]) as repo_prop_file: - return parse_repo_prop(repo_prop_file.read()) - args = ["repo", "forall", "-c", 'echo "$REPO_PATH $REPO_LREV"'] try: output = subprocess.check_output(args, text=True) @@ -151,7 +147,8 @@ class Stamp(object): all_projects.extend(self.projects) for proj in all_projects: - candidate = os.path.join(proj, "scripts/setlocalversion") + candidate = os.path.join(proj, + "scripts/setlocalversion") if os.access(candidate, os.X_OK): self.setlocalversion = os.path.realpath(candidate) return |