* [OE-core][PATCH] classes/staging: Allow tasks to opt-out of extending the sysroot
@ 2024-05-23 18:24 Joshua Watt
0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2024-05-23 18:24 UTC (permalink / raw)
To: openembedded-core; +Cc: Joshua Watt
Adds a task flag called 'extend-sysroot' that allows a task to opt out
of having the sysroot extended just because it depends on
do_populate_sysroot. In some (rare) cases (e.g. SPDX), tasks only really
care about looking at the sysroot output of the local task, and this
allows them to do that without extending the sysroot.
Modify do_prepare_recipe_sysroot to use this new flag instead of being
hard-coded
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/classes-global/staging.bbclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass
index 3678a1b4415..86cdacd307a 100644
--- a/meta/classes-global/staging.bbclass
+++ b/meta/classes-global/staging.bbclass
@@ -646,6 +646,7 @@ python extend_recipe_sysroot() {
extend_recipe_sysroot[vardepsexclude] += "MACHINE_ARCH PACKAGE_EXTRA_ARCHS SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot"
+do_prepare_recipe_sysroot[extend-sysroot] = "0"
python do_prepare_recipe_sysroot () {
bb.build.exec_func("extend_recipe_sysroot", d)
}
@@ -655,7 +656,8 @@ python staging_taskhandler() {
bbtasks = e.tasklist
for task in bbtasks:
deps = d.getVarFlag(task, "depends")
- if task != 'do_prepare_recipe_sysroot' and (task == "do_configure" or (deps and "populate_sysroot" in deps)):
+ extend_sysroot = d.getVarFlag(task, "extend-sysroot") or "1"
+ if extend_sysroot == "1" and (task == "do_configure" or (deps and "populate_sysroot" in deps)):
d.prependVarFlag(task, "prefuncs", "extend_recipe_sysroot ")
}
staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess"
--
2.43.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-23 18:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-23 18:24 [OE-core][PATCH] classes/staging: Allow tasks to opt-out of extending the sysroot Joshua Watt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox