diff options
-rw-r--r-- | lib/spack/spack/spec.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4ae7a1a5b4..7704d7df72 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2060,6 +2060,9 @@ class Spec(object): index = ProviderIndex([dep], restrict=True) items = list(spec_deps.items()) for name, vspec in items: + if not vspec.virtual: + continue + if index.providers_for(vspec): vspec._replace_with(dep) del spec_deps[vspec.name] |