diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index 0ae6f765f4a..73286483efb 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -268,6 +268,13 @@ def check_installed(self, spec): 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: