diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index ef75eaff2c..46ee04ae90 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2103,6 +2103,8 @@ class Spec(object): node[hash.name] = self.build_hash() elif hash.name == 'process_hash': node[hash.name] = self.process_hash() + elif hash.name == 'runtime_hash': + node[hash.name] = self.runtime_hash() return node @@ -2244,11 +2246,17 @@ class Spec(object): dep_hash, deptypes = elt elif isinstance(elt, dict): # new format: elements of dependency spec are keyed. - for key in (ht.full_hash.name, + for key in (ht.dag_hash.name, + ht.full_hash.name, ht.build_hash.name, - ht.dag_hash.name, + ht.runtime_hash.name, ht.process_hash.name): if key in elt: + # FIXME: if the key is 'hash' it could mean the old + # dag hash without build deps, or the new dag hash which + # is equivalent to the full hash. If this was the old + # dag hash, we need to keep the hash value but set the + # key hash type to "runtime_hash". dep_hash, deptypes = elt[key], elt['type'] hash_type = key break @@ -3793,6 +3801,7 @@ class Spec(object): self._dunder_hash = other._dunder_hash self._normal = True self._full_hash = other._full_hash + self._runtime_hash = other._runtime_hash self._package_hash = other._package_hash else: self._hash = None @@ -3802,6 +3811,7 @@ class Spec(object): # always set it False here to avoid the complexity of checking self._normal = False self._full_hash = None + self._runtime_hash = None self._package_hash = None return changed @@ -4741,6 +4751,7 @@ class Spec(object): for dep in ret.traverse(root=True, order='post'): opposite = other_nodes if dep.name in self_nodes else self_nodes if any(name in dep for name in opposite.keys()): + # package hash cannot be affected by splice dep.clear_cached_hashes(ignore=['package_hash']) |