From: Joshua Watt Date: Thu, 30 Jan 2025 13:37:20 +0000 (-0700) Subject: lib/oe/sbom30: Fix SHA256 hash dictionary X-Git-Tag: yocto-5.2~638 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90765467e42241d8b572d035389d7062a0316a9f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git lib/oe/sbom30: Fix SHA256 hash dictionary Fixes a bug in the code that created the hash dictionary that was accidentally excluding items with a SHA256 hash instead of including them Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py index f7c4b323d56..0595ebd41ca 100644 --- a/meta/lib/oe/sbom30.py +++ b/meta/lib/oe/sbom30.py @@ -195,7 +195,7 @@ class ObjectSet(oe.spdx30.SHACLObjectSet): if not isinstance(v, oe.spdx30.Hash): continue - if v.algorithm == oe.spdx30.HashAlgorithm.sha256: + if v.algorithm != oe.spdx30.HashAlgorithm.sha256: continue self.by_sha256_hash.setdefault(v.hashValue, set()).add(obj)