]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/oe/sbom30: Fix SHA256 hash dictionary
authorJoshua Watt <JPEWhacker@gmail.com>
Thu, 30 Jan 2025 13:37:20 +0000 (06:37 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Feb 2025 16:54:15 +0000 (16:54 +0000)
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 <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/sbom30.py

index f7c4b323d56c63f05a2d4a04987831ea827dc8e2..0595ebd41ca1885e7d99a3c26c54b44b29e4e9b9 100644 (file)
@@ -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)