All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [OE-core][PATCH 3/3] lib/oe/sbom.py: Split deduplication of CreationInfo
Date: Mon, 26 Oct 2026 16:06:35 -0600	[thread overview]
Message-ID: <20261026220751.2480577-4-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20261026220751.2480577-1-JPEWhacker@gmail.com>

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(+)

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


      parent reply	other threads:[~2026-10-26 22:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 22:06 [OE-core][PATCH 0/3] Fix incomplete license expressions being preferred over complete ones Joshua Watt
2026-10-26 22:06 ` [OE-core][PATCH 1/3] lib/oe/license.py: Fix documentation of parse_legacy_license() Joshua Watt
2026-10-26 22:06 ` [OE-core][PATCH 2/3] lib/oe/sbom.py: Fix partial licenses masking complete ones Joshua Watt
2026-10-26 22:06 ` Joshua Watt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261026220751.2480577-4-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.