diff mbox series

[8/9] spdx: Ignore ASSUME_PROVIDED recipes

Message ID 20260220154123.376880-9-JPEWhacker@gmail.com
State New
Headers show
Series Add SPDX 3 Recipe Information | expand

Commit Message

Joshua Watt Feb. 20, 2026, 3:40 p.m. UTC
Ignore recipes in ASSUME_PROVIDED when generating SPDX dependencies,
since these recipes are not actually built

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/lib/oe/spdx_common.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/spdx_common.py b/meta/lib/oe/spdx_common.py
index 72c24180d5..03863ef362 100644
--- a/meta/lib/oe/spdx_common.py
+++ b/meta/lib/oe/spdx_common.py
@@ -104,9 +104,12 @@  def collect_direct_deps(d, dep_task):
 
     deps = set()
 
+    ignore = set(d.getVar("ASSUME_PROVIDED").split())
+    ignore.add(pn)
+
     for dep_name in this_dep.deps:
         dep_data = taskdepdata[dep_name]
-        if dep_data.taskname == dep_task and dep_data.pn != pn:
+        if dep_data.taskname == dep_task and dep_data.pn not in ignore:
             deps.add((dep_data.pn, dep_data.hashfn, dep_name in this_dep.taskhash_deps))
 
     return sorted(deps)