From: Alexandre Marques <c137.marques@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: yoann.congal@smile.fr, Pascal Eberhard <pascal.eberhard@se.com>,
Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
Alexandre Marques <alexandre.marques@ctw.bmwgroup.com>
Subject: [wrynose][PATCH 2/2] spdx30_tasks: fix missing SPDX runtime dependencies
Date: Sat, 28 Nov 2026 00:50:09 +0000 [thread overview]
Message-ID: <20261128005009.4101905-3-c137.marques@gmail.com> (raw)
In-Reply-To: <20261128005009.4101905-1-c137.marques@gmail.com>
From: Pascal Eberhard <pascal.eberhard@se.com>
The runtime dependsOn relationship entries between software_Package
is missing from the generated SPDX files.
Remove the subpkgdata lookup as the final pkg_name is already resolved
by collect_package_providers().
Rename variables to avoid shadowing the 'dep' variable and to make it
explicit which package/pkg name is being used.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a67f44021f39b19f42791441616ba57d522f1d00)
[Adjusted context: wrynose does not have 28ffcc0653 ("spdx: Reformat")]
Signed-off-by: Alexandre Marques <alexandre.marques@ctw.bmwgroup.com>
---
meta/lib/oe/spdx30_tasks.py | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 953a4ba052..d89763743c 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -1129,9 +1129,13 @@ def create_spdx(d):
def create_package_spdx(d):
deploydir = Path(d.getVar("SPDXRUNTIMEDEPLOY"))
+ pkgdatadir = Path(d.getVar('PKGDATA_DIR'))
direct_deps = oe.spdx_common.collect_direct_deps(d, "do_create_spdx")
+ # providers[package_name] = pkg_name, where:
+ # - package_name is the name in the recipe in PACKAGES/RDEPENDS, and
+ # - pkg_name is the final name given by the package manager.
providers = oe.spdx_common.collect_package_providers(d, direct_deps)
pkg_arch = d.getVar("SSTATE_PKGARCH")
@@ -1185,26 +1189,24 @@ def create_package_spdx(d):
if dep not in providers:
continue
- (dep, _) = providers[dep]
+ dep_pkg_name, _ = providers[dep]
- if not oe.packagedata.packaged(dep, localdata):
+ if not os.path.exists(pkgdatadir / "runtime-reverse" / dep_pkg_name):
+ bb.debug(1, f"pkg_name {dep_pkg_name}, package {dep} missing for {package}")
continue
- dep_pkg_data = oe.packagedata.read_subpkgdata_dict(dep, d)
- dep_pkg = dep_pkg_data["PKG"]
-
- if dep in dep_package_cache:
- dep_spdx_package = dep_package_cache[dep]
+ if dep_pkg_name in dep_package_cache:
+ dep_spdx_package = dep_package_cache[dep_pkg_name]
else:
- bb.debug(1, "Searching for %s" % dep_pkg)
+ bb.debug(1, "Searching for %s" % dep_pkg_name)
dep_spdx_package, _ = oe.sbom30.find_root_obj_in_jsonld(
d,
"packages-staging",
- "package-" + dep_pkg,
+ "package-" + dep_pkg_name,
oe.spdx30.software_Package,
software_primaryPurpose=oe.spdx30.software_SoftwarePurpose.install,
)
- dep_package_cache[dep] = dep_spdx_package
+ dep_package_cache[dep_pkg_name] = dep_spdx_package
runtime_spdx_deps.add(dep_spdx_package)
seen_deps.add(dep)
prev parent reply other threads:[~2026-11-28 0:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 0:50 [wrynose][PATCH 0/2] spdx30_tasks: fix missing content in the image and SDK SBOMs Alexandre Marques
2026-11-28 0:50 ` [wrynose][PATCH 1/2] spdx30_tasks: include the SDK target packages in the SDK SBOM Alexandre Marques
2026-11-28 0:50 ` Alexandre Marques [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=20261128005009.4101905-3-c137.marques@gmail.com \
--to=c137.marques@gmail.com \
--cc=alexandre.marques@ctw.bmwgroup.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=pascal.eberhard@se.com \
--cc=richard.purdie@linuxfoundation.org \
--cc=yoann.congal@smile.fr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox