| Message ID | 20261026220751.2480577-4-JPEWhacker@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | Fix incomplete license expressions being preferred over complete ones | expand |
diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py index 713eec92d4..e279cfc82b 100644 --- a/meta/lib/oe/sbom30.py +++ b/meta/lib/oe/sbom30.py @@ -1236,6 +1236,7 @@ def create_sbom(d, name, root_elements, add_objectsets=[]): choose=choose_license_expressions, ) + with objset.deduplicate() as dedup: # Deduplicate creation info dedup.find_duplicates(cmp_creation_info, oe.spdx30.CreationInfo)
The deduplicate logic has a logic flaw in that it was scanning over all deduplicated items from previous calls to find_deduplicates(). This doesn't make any sense because the types of objects already being deduplicated might not match the new filter. In practice, this didn't matter because the CreationInfo comparison function doesn't do anything that cares if the type is actually a CreationInfo; so it didn't fail when it was passed something else. Fix this by creating a separate instance of the deduplication object to start with a clean state Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- meta/lib/oe/sbom30.py | 1 + 1 file changed, 1 insertion(+)