openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [OE-core][PATCH] classes/create-spdx-2.2: Fix SPDXDIR affecting multiconfig machines
@ 2025-02-10 12:50 Piotr Łobacz
  2025-02-10 13:42 ` Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Piotr Łobacz @ 2025-02-10 12:50 UTC (permalink / raw)
  To: openembedded-core, JPEWhacker; +Cc: Piotr Łobacz

Currently SPDXDIR is pointing to `${WORKDIR}/spdx` which means that the by-id
and by-namespace SPDX files are created without differentiation between machines.
This means that for two machines using a common package architecture
(e.g. genericx86-64 and qqemux86-64), there would be overlapping files. This means
that the build of one can remove files from the other leading to build failures. An
example would be:

MACHINE=qemux86-64 bitbake core-image-minimal
MACHINE=genericx86-64 bitbake core-image-minimal
MACHINE=qemux86-64 bitbake linux-yocto -c clean
MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs

To fix this, add MACHINE_ARCH to the SPDXDIR path used for the files in order
to differentiate packages' dependencies between machines.

This commit fixes issue repored by Khem [1]

[1] https://patchwork.yoctoproject.org/comment/13577/

Signed-off-by: Piotr Łobacz <pio.lobacz@gmail.com>
---
 meta/classes/create-spdx-2.2.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index ade1a04be3..9e228891ab 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -11,7 +11,7 @@ DEPLOY_DIR_SPDX ??= "${DEPLOY_DIR}/spdx"
 CVE_PRODUCT ??= "${BPN}"
 CVE_VERSION ??= "${PV}"
 
-SPDXDIR ??= "${WORKDIR}/spdx"
+SPDXDIR ??= "${WORKDIR}/spdx/${MACHINE_ARCH}"
 SPDXDEPLOY = "${SPDXDIR}/deploy"
 SPDXWORK = "${SPDXDIR}/work"
 SPDXIMAGEWORK = "${SPDXDIR}/image-work"
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-13 10:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 12:50 [OE-core][PATCH] classes/create-spdx-2.2: Fix SPDXDIR affecting multiconfig machines Piotr Łobacz
2025-02-10 13:42 ` Richard Purdie
2025-02-10 16:58   ` Piotr Łobacz
2025-02-10 17:50     ` Joshua Watt
2025-02-10 20:50       ` Piotr Łobacz
2025-02-12 22:06         ` Joshua Watt
2025-02-13  8:56           ` Piotr Łobacz
2025-02-13  8:59             ` Piotr Łobacz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).