diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-12-01 18:09:14 +0100 |
---|---|---|
committer | Tamara Dahlgren <dahlgren1@llnl.gov> | 2021-02-17 17:07:18 -0800 |
commit | 0b7a22dea26c9a4608f9e4864bc02f136a9302ab (patch) | |
tree | 2a250381533c138b74cf3e1e5e8419bd462db5c0 | |
parent | 1e1a6f4e3068831a7d2ffd250db0029f4603444d (diff) | |
download | spack-0b7a22dea26c9a4608f9e4864bc02f136a9302ab.tar.gz spack-0b7a22dea26c9a4608f9e4864bc02f136a9302ab.tar.bz2 spack-0b7a22dea26c9a4608f9e4864bc02f136a9302ab.tar.xz spack-0b7a22dea26c9a4608f9e4864bc02f136a9302ab.zip |
spec: return early from concretization if a spec is already concrete (#20196)
-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 ac4ce87331..46400859d3 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2442,6 +2442,9 @@ class Spec(object): 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() |