summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-09-02 01:26:01 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-09-02 01:26:01 -0700
commit69d45b49e9b9a589b1e8ae782a3c726eb2cad343 (patch)
tree273385704b4763cfcf09406b0b84131a14268a20
parentf5bc0cbb65c95249b3f1fd1b5c63da5a03acbded (diff)
downloadspack-69d45b49e9b9a589b1e8ae782a3c726eb2cad343.tar.gz
spack-69d45b49e9b9a589b1e8ae782a3c726eb2cad343.tar.bz2
spack-69d45b49e9b9a589b1e8ae782a3c726eb2cad343.tar.xz
spack-69d45b49e9b9a589b1e8ae782a3c726eb2cad343.zip
Fix hash handling in directory layout
- Currently, build dependencies are not currently hashed; we are waiting to hash these until we have smarter concretization that can reuse more installed specs. The layout needs to account for this when checking whethert things are installed.
-rw-r--r--lib/spack/spack/directory_layout.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index 0ae6f765f4..73286483ef 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -268,6 +268,13 @@ class YamlDirectoryLayout(DirectoryLayout):
if installed_spec == spec:
return path
+ # DAG hashes currently do not include build dependencies.
+ #
+ # TODO: remove this when we do better concretization and don't
+ # ignore build-only deps in hashes.
+ elif installed_spec == spec.copy(deps=('link', 'run')):
+ return path
+
if spec.dag_hash() == installed_spec.dag_hash():
raise SpecHashCollisionError(spec, installed_spec)
else: