From: Sean Nyekjaer <sean@geanix.com>
To: openembedded-core@lists.openembedded.org
Cc: Sean Nyekjaer <sean@geanix.com>
Subject: [PATCH 1/2] rm_work: also remove work directories for do_populate_sdk
Date: Fri, 27 Nov 2026 13:46:40 +0100 [thread overview]
Message-ID: <20261127124657.769093-2-sean@geanix.com> (raw)
In-Reply-To: <20261127124657.769093-1-sean@geanix.com>
do_rm_work_all only runs before do_build, so "bitbake <image> -c
populate_sdk" leaves the work directories of all recipes the SDK
depends on behind.
Add do_rm_work_populate_sdk before do_populate_sdk to run do_rm_work
for those recipes, without building the image itself. Keep it out of
the do_populate_sdk signature, and don't let extend_recipe_sysroot
stage the sysroots of the recipes the do_rm_work tasks depend on.
[YOCTO #15824]
AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
meta/classes-global/staging.bbclass | 3 +++
meta/classes/rm_work.bbclass | 14 ++++++++++++++
meta/lib/oe/sstatesig.py | 5 +++++
3 files changed, 22 insertions(+)
diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass
index 20340a16e1..558d808243 100644
--- a/meta/classes-global/staging.bbclass
+++ b/meta/classes-global/staging.bbclass
@@ -338,6 +338,9 @@ python extend_recipe_sysroot() {
start.add(dep2)
start.remove(dep)
+ # Don't stage the sysroots of the recipes the do_rm_work tasks depend on
+ start = set(dep for dep in start if not setscenedeps[dep][1].startswith("do_rm_work"))
+
#bb.note(" start3 is %s" % str(start))
# Create collapsed do_populate_sysroot -> do_populate_sysroot tree
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 7cb8a325b2..12cb70d55d 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -131,6 +131,20 @@ do_rm_work_all[recrdeptask] = "do_rm_work"
do_rm_work_all[noexec] = "1"
addtask rm_work_all before do_build
+# Remove the work directories of the recipes do_populate_sdk depends on.
+# Only the dependencies on other recipes are copied, so the image isn't built.
+do_rm_work_populate_sdk () {
+ :
+}
+do_rm_work_populate_sdk[recrdeptask] = "do_rm_work"
+do_rm_work_populate_sdk[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends') or ''}"
+do_rm_work_populate_sdk[rdepends] = "${@d.getVarFlag('do_populate_sdk', 'rdepends') or ''}"
+do_rm_work_populate_sdk[noexec] = "1"
+python () {
+ if d.getVarFlag('do_populate_sdk', 'task'):
+ bb.build.addtask('do_rm_work_populate_sdk', 'do_populate_sdk', '', d)
+}
+
do_populate_sdk[postfuncs] += "rm_work_populatesdk"
rm_work_populatesdk () {
:
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index c0e581d0c8..cbe210215e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -39,6 +39,11 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches):
if task == "do_rm_work":
return False
+ # Skip the do_rm_work_populate_sdk task signature, it only removes work
+ # directories and must not change the do_populate_sdk signature
+ if deptaskname == "do_rm_work_populate_sdk":
+ return False
+
# (Almost) always include our own inter-task dependencies (unless it comes
# from a mcdepends). The exception is the special
# do_kernel_configme->do_unpack_and_patch dependency from archiver.bbclass.
--
2.56.0
next prev parent reply other threads:[~2026-11-27 12:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 12:46 [PATCH 0/2] rm_work: remove work directories for do_populate_sdk Sean Nyekjaer
2026-11-27 12:46 ` Sean Nyekjaer [this message]
2026-11-27 12:46 ` [PATCH 2/2] documentation.conf: add do_rm_work_populate_sdk doc Sean Nyekjaer
2026-12-04 13:35 ` [PATCH 0/2] rm_work: remove work directories for do_populate_sdk Paul Barker
2026-12-04 13:49 ` Sean Nyekjaer
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=20261127124657.769093-2-sean@geanix.com \
--to=sean@geanix.com \
--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