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

(From OE-Core rev: 90765467e42241d8b572d035389d7062a0316a9f)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2025-01-30 06:37:20 -07:00
committed by Richard Purdie
parent f16992eb56
commit c8dda4c735

View 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)