From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/5] meta/dummy-sdk-package: Improve SDK dummy package handling
Date: Sat, 14 Mar 2026 09:47:57 +0000 [thread overview]
Message-ID: <20260314094758.3929192-4-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <20260314094758.3929192-1-richard.purdie@linuxfoundation.org>
Currently, the dummy SDK packages are re-running for different SDKMACHINE values
when they should not. The usage of allarch is broken and not triggering the right
PACKAGE_ARCH value due to the deferred nature of nativesdk. This was probably
broken when we switched to add deferred classes.
To try and make this all more explict and less prone to breakage, switch to calling
oe.utils.make_arch_independent() directly.
Add the 'special' package architecture values to SSTATE_ARCHS so the system cna properly
track them.
Remove the pointless tasks we don't need from the dummy recipes, mark the packagedata
as machine independent and then remove from the conflict list in sstate.bbclass.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes-global/sstate.bbclass | 6 ++---
meta/lib/oe/sstatesig.py | 6 ++++-
meta/recipes-core/meta/dummy-sdk-package.inc | 25 +++++++++++++------
.../meta/nativesdk-buildtools-perl-dummy.bb | 2 ++
.../meta/nativesdk-sdk-provides-dummy.bb | 3 +++
.../meta/target-sdk-provides-dummy.bb | 2 ++
6 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index fec4d88c4cf..f124f33b2d3 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -57,9 +57,6 @@ SSTATE_EXTRAPATHWILDCARD[vardepvalue] = ""
# Avoid docbook/sgml catalog warnings for now
SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
-# sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE
-SSTATE_ALLOW_OVERLAP_FILES += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-nativesdk/"
-SSTATE_ALLOW_OVERLAP_FILES += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/"
# target-sdk-provides-dummy overlaps that allarch is disabled when multilib is used
SSTATE_ALLOW_OVERLAP_FILES += "${COMPONENTS_DIR}/sdk-provides-dummy-target/ ${DEPLOY_DIR_RPM}/sdk_provides_dummy_target/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-target/"
# Archive the sources for many architectures in one deploy folder
@@ -90,6 +87,9 @@ SSTATE_ARCHS = " \
${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \
${SDK_ARCH}_${SDK_OS} \
${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX} \
+ buildtools-dummy-${SDKPKGSUFFIX} \
+ sdk-provides-dummy-target \
+ sdk-provides-dummy-${SDKPKGSUFFIX} \
allarch \
${SSTATE_ARCHS_TUNEPKG} \
${PACKAGE_EXTRA_ARCHS} \
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 1e07c71e944..4693b73375e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -513,7 +513,10 @@ def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
if taskdata.endswith("-native"):
pkgarchs = ["${BUILD_ARCH}", "${BUILD_ARCH}_${ORIGNATIVELSBSTRING}"]
elif taskdata.startswith("nativesdk-"):
- pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
+ pkgarchs = ["${SDK_ARCH}_${SDK_OS}",
+ "allarch",
+ "buildtools-dummy-${SDKPKGSUFFIX}",
+ "sdk-provides-dummy-${SDKPKGSUFFIX}"]
elif "-cross-canadian" in taskdata:
pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"]
elif "-cross-" in taskdata:
@@ -524,6 +527,7 @@ def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
pkgarchs = ['${MACHINE_ARCH}']
pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
pkgarchs.append('allarch')
+ pkgarchs.append('sdk-provides-dummy-target')
pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}')
searched_manifests = []
diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc
index bf453cac9be..60dfe9f73bb 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -1,18 +1,21 @@
SUMMARY = "Dummy packages which handle excluding packages from the sdk, e.g. ensuring perl is excluded from buildtools"
LICENSE = "MIT"
-PACKAGE_ARCH = "all"
-
-inherit allarch
-
INHIBIT_DEFAULT_DEPS = "1"
python() {
+ pkgdata_var = d.getVar("DUMMYSDK_PKGDATA_VARNAME")
+ # Expand PKGDATA_DIR_SDK/SDK_SYS and stamp-extra-info before we lose the values
+ d.setVar(pkgdata_var, d.getVar(pkgdata_var))
+ stampinfo = d.getVar("DUMMYSDK_EXTRASTAMP_VARNAME")
+ d.setVarFlag("do_packagedata", "stamp-extra-info", d.getVar(stampinfo))
+
+ oe.utils.make_arch_independent(d)
+
# Put the package somewhere separate to ensure it's never used except
# when we want it
- # (note that we have to do this in anonymous python here to avoid
- # allarch.bbclass disabling itself)
- d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
+ # Need to set PACKAGE_ARCH after deferred nativesdk inherit
+ d.setVar("PACKAGE_ARCH", "${DUMMYARCH}")
}
ALLOW_EMPTY:${PN} = "1"
@@ -31,3 +34,11 @@ python populate_packages:prepend() {
d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
}
+deltask fetch
+deltask unpack
+deltask patch
+deltask prepare_recipe_sysroot
+deltask configure
+deltask compile
+deltask install
+deltask populate_sysroot
diff --git a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index 0ba1ca6e426..f97a28cab56 100644
--- a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -1,4 +1,6 @@
DUMMYARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
+DUMMYSDK_PKGDATA_VARNAME = "PKGDATA_DIR_SDK"
+DUMMYSDK_EXTRASTAMP_VARNAME = "SDK_SYS"
DUMMYPROVIDES_PACKAGES = "\
nativesdk-perl \
diff --git a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
index 1d71f373a4e..37dad54409f 100644
--- a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
+++ b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -1,5 +1,8 @@
DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
+DUMMYSDK_PKGDATA_VARNAME = "PKGDATA_DIR_SDK"
+DUMMYSDK_EXTRASTAMP_VARNAME = "SDK_SYS"
+
DUMMYPROVIDES_PACKAGES = "\
pkgconfig \
"
diff --git a/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
index 849407cca57..65b87fd97dd 100644
--- a/meta/recipes-core/meta/target-sdk-provides-dummy.bb
+++ b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -1,4 +1,6 @@
DUMMYARCH = "sdk-provides-dummy-target"
+DUMMYSDK_PKGDATA_VARNAME = "PKGDATA_DIR"
+DUMMYSDK_EXTRASTAMP_VARNAME = "MACHINE"
DUMMYPROVIDES_PACKAGES = "\
busybox \
next prev parent reply other threads:[~2026-03-14 9:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 9:47 [PATCH 1/5] sstate: Drop unneeded SSTATE_MANMACH variable Richard Purdie
2026-03-14 9:47 ` [PATCH 2/5] bitbake.conf: Add SDKMACHINE to BUILDCFG_VARS, drop TARGET_FPU Richard Purdie
2026-03-16 16:37 ` [OE-core] " Alejandro Hernandez
2026-03-16 21:01 ` Richard Purdie
2026-03-14 9:47 ` [PATCH 3/5] allarch/lib: Convert core of allarch code into a function Richard Purdie
2026-03-14 9:47 ` Richard Purdie [this message]
2026-03-15 14:08 ` [OE-core] [PATCH 4/5] meta/dummy-sdk-package: Improve SDK dummy package handling Mathieu Dubois-Briand
2026-03-14 9:47 ` [PATCH 5/5] sstate: Tweak SDK sstate package architecture Richard Purdie
[not found] ` <189CAC32AB5A06DA.1508127@lists.openembedded.org>
2026-03-14 10:00 ` [OE-core] [PATCH 4/5] meta/dummy-sdk-package: Improve SDK dummy package handling Richard Purdie
2026-03-14 14:40 ` Bruce Ashfield
[not found] ` <189CACDC59FF3062.2629287@lists.openembedded.org>
2026-03-14 10:28 ` Richard Purdie
2026-03-16 16:37 ` Randy MacLeod
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=20260314094758.3929192-4-richard.purdie@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox