diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/bootstrap/core.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/spec.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/bootstrap.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/test/data/config/bootstrap.yaml | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index 606e80d6d8..4b7807e47b 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -228,7 +228,7 @@ class BuildcacheBootstrapper(Bootstrapper): if not abstract_spec.intersects(candidate_spec): continue - if python_spec is not None and python_spec not in abstract_spec: + if python_spec is not None and not abstract_spec.intersects(f"^{python_spec}"): continue for _, pkg_hash, pkg_sha256 in item["binaries"]: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 20f7f22227..08576419f0 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3672,7 +3672,7 @@ class Spec: return spec_like return Spec(spec_like) - def intersects(self, other: "Spec", deps: bool = True) -> bool: + def intersects(self, other: Union[str, "Spec"], deps: bool = True) -> bool: """Return True if there exists at least one concrete spec that matches both self and other, otherwise False. @@ -3795,7 +3795,7 @@ class Spec: return True - def satisfies(self, other: "Spec", deps: bool = True) -> bool: + def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool: """Return True if all concrete specs matching self also match other, otherwise False. Args: diff --git a/lib/spack/spack/test/cmd/bootstrap.py b/lib/spack/spack/test/cmd/bootstrap.py index eff9bf042d..277a279222 100644 --- a/lib/spack/spack/test/cmd/bootstrap.py +++ b/lib/spack/spack/test/cmd/bootstrap.py @@ -169,7 +169,7 @@ def test_remove_and_add_a_source(mutable_config): assert not sources # Add it back and check we restored the initial state - _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.3") + _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.5") sources = spack.bootstrap.core.bootstrapping_sources() assert len(sources) == 1 diff --git a/lib/spack/spack/test/data/config/bootstrap.yaml b/lib/spack/spack/test/data/config/bootstrap.yaml index 6adb7ab996..4757b8729d 100644 --- a/lib/spack/spack/test/data/config/bootstrap.yaml +++ b/lib/spack/spack/test/data/config/bootstrap.yaml @@ -1,5 +1,5 @@ bootstrap: sources: - name: 'github-actions' - metadata: $spack/share/spack/bootstrap/github-actions-v0.3 + metadata: $spack/share/spack/bootstrap/github-actions-v0.5 trusted: {} |