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 <[email protected]> --- 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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#199816): https://lists.openembedded.org/g/openembedded-core/message/199816 Mute This Topic: https://lists.openembedded.org/mt/106267934/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
