diff options
author | George Burgess IV <gbiv@google.com> | 2023-11-09 11:50:30 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-12-04 15:58:44 +0000 |
commit | 09d24dbddc5abd2a6a602d817e2cf7e8dbde1c61 (patch) | |
tree | 4bcfbe8e3aa693bbdc33fc6880bd48967fbecb5d /rust_tools/copy_rust_bootstrap.py | |
parent | eeadef2b2d4664aa3e60c73cd907322e3216ef38 (diff) | |
download | toolchain-utils-09d24dbddc5abd2a6a602d817e2cf7e8dbde1c61.tar.gz |
rust_tools: add auto_upload_rust_bootstrap
This adds a script that automatically keeps rust-bootstrap ebuilds
up-to-date with available prebuilts. The intent is to run it on
Chrotomation regularly, so toolchain Rust devs don't need to worry about
it.
BUG=b:309950482
TEST=crrev.com/c/5018849
Change-Id: Iadb6f7d8d1b793cf7bd339ca50eda0704c747f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/5037991
Reviewed-by: Bob Haarman <inglorion@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'rust_tools/copy_rust_bootstrap.py')
-rwxr-xr-x | rust_tools/copy_rust_bootstrap.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust_tools/copy_rust_bootstrap.py b/rust_tools/copy_rust_bootstrap.py index 1f24d8e4..5e4f4278 100755 --- a/rust_tools/copy_rust_bootstrap.py +++ b/rust_tools/copy_rust_bootstrap.py @@ -36,7 +36,7 @@ def _ensure_lbzip2_is_installed(): subprocess.run(["sudo", "emerge", "-g", "lbzip2"], check=True) -def _determine_target_path(sdk_path: str) -> str: +def determine_target_path(sdk_path: str) -> str: """Determine where `sdk_path` should sit in localmirror.""" gs_prefix = "gs://" if not sdk_path.startswith(gs_prefix): @@ -185,7 +185,7 @@ def main(argv: List[str]): parser.error("Run me from within the chroot.") _ensure_lbzip2_is_installed() - target_path = _determine_target_path(opts.sdk_artifact) + target_path = determine_target_path(opts.sdk_artifact) with tempfile.TemporaryDirectory() as tempdir: download_path = Path(tempdir) / "sdk_artifact" _download(opts.sdk_artifact, download_path) |