summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2025-03-21 09:12:39 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-24 17:29:16 +0000
commit7bbbc92c3b77a12701ad0524dc6d75287efa1927 (patch)
tree5ae292af62acd8a074eed4794fa56cc20ae119fd /meta/classes
parentb76c04bdcbc527b76c0811822d4ca8200ba809b4 (diff)
downloadpoky-7bbbc92c3b77a12701ad0524dc6d75287efa1927.tar.gz
classes: create-spdx-2.2: Fix dependency handling
The common SPDX code was changed to return a dataclass for dependency information instead of a namedtuple, but the SPDX 2.2 was missed to account for this. Correct the SPDX 2.2 code to correctly handle the new datatype (From OE-Core rev: 79a03abd37839973996efc957d44614edcbd6b87) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/create-spdx-2.2.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index 8f988de868..de62379c50 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -279,21 +279,21 @@ def collect_dep_recipes(d, doc, spdx_recipe):
279 279
280 deps = oe.spdx_common.get_spdx_deps(d) 280 deps = oe.spdx_common.get_spdx_deps(d)
281 281
282 for dep_pn, dep_hashfn, in_taskhash in deps: 282 for dep in deps:
283 # If this dependency is not calculated in the taskhash skip it. 283 # If this dependency is not calculated in the taskhash skip it.
284 # Otherwise, it can result in broken links since this task won't 284 # Otherwise, it can result in broken links since this task won't
285 # rebuild and see the new SPDX ID if the dependency changes 285 # rebuild and see the new SPDX ID if the dependency changes
286 if not in_taskhash: 286 if not dep.in_taskhash:
287 continue 287 continue
288 288
289 dep_recipe_path = oe.sbom.doc_find_by_hashfn(deploy_dir_spdx, package_archs, "recipe-" + dep_pn, dep_hashfn) 289 dep_recipe_path = oe.sbom.doc_find_by_hashfn(deploy_dir_spdx, package_archs, "recipe-" + dep.pn, dep.hashfn)
290 if not dep_recipe_path: 290 if not dep_recipe_path:
291 bb.fatal("Cannot find any SPDX file for recipe %s, %s" % (dep_pn, dep_hashfn)) 291 bb.fatal("Cannot find any SPDX file for recipe %s, %s" % (dep.pn, dep.hashfn))
292 292
293 spdx_dep_doc, spdx_dep_sha1 = oe.sbom.read_doc(dep_recipe_path) 293 spdx_dep_doc, spdx_dep_sha1 = oe.sbom.read_doc(dep_recipe_path)
294 294
295 for pkg in spdx_dep_doc.packages: 295 for pkg in spdx_dep_doc.packages:
296 if pkg.name == dep_pn: 296 if pkg.name == dep.pn:
297 spdx_dep_recipe = pkg 297 spdx_dep_recipe = pkg
298 break 298 break
299 else: 299 else: