summaryrefslogtreecommitdiff
path: root/lib/spack/spack/directory_layout.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/directory_layout.py')
-rw-r--r--lib/spack/spack/directory_layout.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index 145421130a..cbaa9b47fd 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -15,6 +15,7 @@ import ruamel.yaml as yaml
from llnl.util.filesystem import mkdirp
import spack.config
+import spack.hash_types as ht
import spack.spec
from spack.error import SpackError
@@ -242,7 +243,9 @@ class YamlDirectoryLayout(DirectoryLayout):
"""Write a spec out to a file."""
_check_concrete(spec)
with open(path, 'w') as f:
- spec.to_yaml(f)
+ # The hash the the projection is the DAG hash but we write out the
+ # full provenance by full hash so it's availabe if we want it later
+ spec.to_yaml(f, hash=ht.full_hash)
def read_spec(self, path):
"""Read the contents of a file and parse them as a spec"""