diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index eddbbf934c..19242bc06a 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1639,7 +1639,7 @@ class Spec: Known flags currently include "arch" """ - if propagate and name in spack.directives.reserved_names: + if propagate and name in vt.reserved_names: raise UnsupportedPropagationError( f"Propagation with '==' is not supported for '{name}'." ) @@ -2935,9 +2935,7 @@ class Spec: pkg_variants = pkg_cls.variants # reserved names are variants that may be set on any package # but are not necessarily recorded by the package's class - not_existing = set(spec.variants) - ( - set(pkg_variants) | set(spack.directives.reserved_names) - ) + not_existing = set(spec.variants) - (set(pkg_variants) | set(vt.reserved_names)) if not_existing: raise vt.UnknownVariantError(spec, not_existing) |