spec: return early from concretization if a spec is already concrete (#20196)

This commit is contained in:
Massimiliano Culpo 2020-12-01 18:09:14 +01:00 committed by Tamara Dahlgren
parent 1e1a6f4e30
commit 0b7a22dea2

View File

@ -2442,6 +2442,9 @@ def _new_concretize(self, tests=False):
raise spack.error.SpecError(
"Spec has no name; cannot concretize an anonymous spec")
if self._concrete:
return
result = spack.solver.asp.solve([self], tests=tests)
if not result.satisfiable:
result.print_cores()