diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8a4fc12861..743f84c3c8 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -951,7 +951,7 @@ class SpecBuildInterface(lang.ObjectWrapper): def __init__(self, spec, name, query_parameters): super(SpecBuildInterface, self).__init__(spec) - is_virtual = Spec.is_virtual(name) + is_virtual = spack.repo.path.is_virtual(name) self.last_query = QueryState( name=name, extra_parameters=query_parameters, @@ -1227,12 +1227,9 @@ class Spec(object): Possible idea: just use conventin and make virtual deps all caps, e.g., MPI vs mpi. """ - return Spec.is_virtual(self.name) - - @staticmethod - def is_virtual(name): - """Test if a name is virtual without requiring a Spec.""" - return (name is not None) and (not spack.repo.path.exists(name)) + # This method can be called while regenerating the provider index + # So we turn off using the index to detect virtuals + return spack.repo.path.is_virtual(self.name, use_index=False) @property def concrete(self): |