summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2021-10-22 02:54:23 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2021-11-05 00:15:47 -0700
commitc537785f6fc9da7ab81e3a6413e839aac4ec7fd3 (patch)
tree9a634105a71861abcc46c8b591cf5e2ffea2debb
parentb60a95cd5d037b6abf5aafff4e9c231f7f00dae4 (diff)
downloadspack-c537785f6fc9da7ab81e3a6413e839aac4ec7fd3.tar.gz
spack-c537785f6fc9da7ab81e3a6413e839aac4ec7fd3.tar.bz2
spack-c537785f6fc9da7ab81e3a6413e839aac4ec7fd3.tar.xz
spack-c537785f6fc9da7ab81e3a6413e839aac4ec7fd3.zip
spec: ensure_valid_variants() should not validate concrete specs
Variants in concrete specs are "always" correct -- or at least we assume them to be b/c they were concretized before. Their variants need not match the current version of the package.
-rw-r--r--lib/spack/spack/spec.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index ca3ad5f317..08625eaa82 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -3052,6 +3052,10 @@ class Spec(object):
Raises:
spack.variant.UnknownVariantError: on the first unknown variant found
"""
+ # concrete variants are always valid
+ if spec.concrete:
+ return
+
pkg_cls = spec.package_class
pkg_variants = pkg_cls.variants
# reserved names are variants that may be set on any package