diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 6ae8fa036d..eac51b0f46 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -4016,8 +4016,12 @@ class Spec: return str(path_ctor(*output_path_components)) def __str__(self): + if self._concrete: + return self.format("{name}{@version}{/hash:7}") + if not self._dependencies: return self.format() + root_str = [self.format()] sorted_dependencies = sorted( self.traverse(root=False), key=lambda x: (x.name, x.abstract_hash) |