From 970f18cd45ffdf642a9d321039bae61520f6c218 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Oct 2024 01:33:56 -0700 Subject: [PATCH] add back patch level Signed-off-by: Todd Gamblin --- lib/spack/spack/package_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index ef6a9347b1d..f670295e4e5 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -1807,7 +1807,7 @@ def artifact_hashes(self, content=None): tty.debug(message.format(s=self)) for resource in self._get_needed_resources(): - sources.append(resource.fetcher.spec_attrs()) + sources.append(resource.fetcher.source_provenance()) if sources: hashes["sources"] = sources @@ -1817,7 +1817,9 @@ def artifact_hashes(self, content=None): # We check spec._patches_assigned instead of spec.concrete because # we have to call package_hash *before* marking specs concrete if self.spec._patches_assigned(): - hashes["patches"] = [p.sha256 for p in self.spec.patches] + hashes["patches"] = [ + {"sha256": patch.sha256, "level": patch.level} for patch in self.spec.patches + ] # package.py contents hashes["package_hash"] = ph.package_hash(self.spec, source=content)