clarify comment on use of _package_hash
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
This commit is contained in:
parent
4a2f5f4b50
commit
752c0d4fe2
@ -2202,10 +2202,12 @@ def to_node_dict(self, hash=ht.dag_hash):
|
|||||||
d["concrete"] = False
|
d["concrete"] = False
|
||||||
|
|
||||||
if self._concrete and hash.package_hash:
|
if self._concrete and hash.package_hash:
|
||||||
# We use the attribute here instead of `self.package_hash()` because this should
|
# We use the `_package_hash` attribute here instead of `self.package_hash()`
|
||||||
# *always* be assigned at concretization time. We don't want to try to compute a
|
# because `_package_hash` is *always* assigned at concretization time. If
|
||||||
# package hash for concrete spec where a) the package might not exist, or b) the
|
# the attribute is present, we should include it. If it isn't, we avoid
|
||||||
# `dag_hash` didn't include the package hash when the spec was concretized.
|
# computing it because a) the package may no longer exist, or b) this is an
|
||||||
|
# older spec and the `dag_hash` didn't include the package hash when the
|
||||||
|
# spec was concretized.
|
||||||
if hasattr(self, "_package_hash") and self._package_hash:
|
if hasattr(self, "_package_hash") and self._package_hash:
|
||||||
d["package_hash"] = self._package_hash
|
d["package_hash"] = self._package_hash
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user