From c537785f6fc9da7ab81e3a6413e839aac4ec7fd3 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 22 Oct 2021 02:54:23 -0700 Subject: 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. --- lib/spack/spack/spec.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3-70-g09d2