From fcf9e19a418b9db1fa517b98d087a5e387d1af8f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 2 Nov 2023 13:17:14 +0100 Subject: [PATCH] go/rust bootstrap: no versions if unsupported arch The lookup in a dictionary causes KeyError on package load for unsupported architectures such as i386 and ppc big endian. --- var/spack/repos/builtin/packages/go-bootstrap/package.py | 2 +- var/spack/repos/builtin/packages/rust-bootstrap/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py index 047f9f3353b93..4f5c8f0073243 100644 --- a/var/spack/repos/builtin/packages/go-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -59,7 +59,7 @@ class GoBootstrap(Package): # determine system os and architecture/target os = platform.system().lower() - target = go_targets[platform.machine().lower()] + target = go_targets.get(platform.machine().lower(), platform.machine().lower()) # construct releases for current system configuration for release in go_releases: diff --git a/var/spack/repos/builtin/packages/rust-bootstrap/package.py b/var/spack/repos/builtin/packages/rust-bootstrap/package.py index 84100bf2424a1..337618e20e38f 100644 --- a/var/spack/repos/builtin/packages/rust-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/rust-bootstrap/package.py @@ -73,7 +73,7 @@ class RustBootstrap(Package): # Determine system os and architecture/target. os = platform.system().lower() - target = rust_targets[platform.machine().lower()] + target = rust_targets.get(platform.machine().lower(), platform.machine().lower()) # Pre-release versions of the bootstrap compiler. # Note: These versions are unchecksumed since they will change