On Tue, 7 Jul 2026 at 12:52, Richard Purdie < [email protected]> wrote:
> On Mon, 2026-07-06 at 15:21 +0100, Richard Purdie via > lists.openembedded.org wrote: > > On Sat, 2026-04-18 at 20:34 +0200, Adam Blank via lists.openembedded.org > wrote: > > > It has lain there for a while, obscuring certain aspects of > > > how task signatures are calculated. > > > > > > This changeset does not change the current status quo, but > > > rather changes the way in which it is implemented. It can be > > > followed by changes which further refine what is excluded and > > > how, from those tasks which refer to 'extend_recipe_sysroot'. > > > > > > Related discussion: > > > > https://lore.kernel.org/openembedded-core/aa893eb861bf4dd18e3e84e6bbebdee3b0367d1b.ca...@linuxfoundation.org/ > > > > > > Signed-off-by: Adam Blank <[email protected]> > > > --- > > > Adam Blank (7): > > > package_pkgdata: fix typo to stop calling undefined function > > > staging: add 'vardepsexclude' to 'staging_populate_sysroot_dir' > > > staging: add 'extend_recipe_sysroot' to 'vardepsexclude' > > > cross: add 'extend_recipe_sysroot' to 'vardepsexclude' > > > native: add 'extend_recipe_sysroot' to 'vardepsexclude' > > > wic-tool: add 'extend_recipe_sysroot' to 'vardepsexclude' > > > bitbake.conf: remove 'extend_recipe_sysroot' from > BB_HASHEXCLUDE_COMMON > > > > > > meta/classes-global/package_pkgdata.bbclass | 4 +++- > > > meta/classes-global/staging.bbclass | 5 ++++- > > > meta/classes-recipe/cross.bbclass | 1 + > > > meta/classes-recipe/native.bbclass | 1 + > > > meta/conf/bitbake.conf | 2 +- > > > meta/recipes-core/meta/wic-tools.bb | 1 + > > > 6 files changed, 11 insertions(+), 3 deletions(-) > > > > I finally found a bit of time to look at this. I took some of it, I > > ended up reworking some of the patches as they needed rewording to > > justify them and explain the changes being made. > > > > I didn't take the extend_recipe_sysroot removal from bitbake.conf as > > I'm still not convinced we have all the issues that might cause > > identified. The function name typo and the incorrect vardepsexclude are > > fixed though (or will be once a couple of patches pass testing/review > > and merge). > > I still wasn't 100% happy with this so I did go a little further and > hacked up the attached script. It does have one hardcoded path but you > can get the idea of what I'm trying to do. > > You can start with a clean TMPDIR and run "bitbake world -S none". You > can then edit bitbake.conf and remove extend_recipe_sysroot from > BB_HASHEXCLUDE_COMMON and run that command a second time. > > If you them run the attached script in tmp/stamps, after a bit of > processing, you will see: > > Added {'staging_processfixme[func]', 'staging_copydir', 'BB_RUNTASK', > 'oe.utils.get_multilib_datastore', 'sstate_clean_manifest', > 'extend_recipe_sysroot', 'DEFAULTTUNE', 'RECIPE_SYSROOT', > 'oe.sstatesig.find_sstate_manifest', 'TUNE_PKGARCH:tune-x86-64-v3', > 'STAGING_DIR', 'extend_recipe_sysroot[func]', 'RECIPE_SYSROOT_NATIVE', > 'COMPONENTS_DIR', 'staging_copydir[func]', 'staging_copyfile[func]', > 'sstate_clean_manifest[func]', 'staging_populate_sysroot_dir', > 'setscene_depvalid', 'PN', 'oe.path.remove', 'TUNE_PKGARCH', > 'RECIPE_SYSROOT_MANIFEST_SUBDIR', 'TARGET_ARCH', > 'staging_populate_sysroot_dir[func]', 'staging_processfixme', > 'setscene_depvalid[func]', 'staging_copyfile'} > Removed set() > > That means those variables were added as dependencies somewhere in the > build for at least one task. This was basically my worry with the > patch. We need to work out where/why those are being added and triage > them in order to be able to remove extend_recipe_sysroot from the hash > exclusion. Some of them may be acceptable, some of them may not, a lot > depends on context. > > I'm still not sure it is worth the work in changing that, but we do now > at least have a way of checking the effect of such a change. > I've allowed myself to have an AI agent run this and one other analysis of this subject (hopefully this is not prohibited or frowned upon) and I think there might be an attractive compromise. What could be done is the following set of changes, which would assure, that: - the 'extend_recipe_sysroot' exclusion from the signature calculation would remain active - this exclusion would be closer to the code which it logically complements (staging.bbclass) - this would improve the comprehensibility of this design choice - other cases (native.bbclass, cross.bbclass, et al) would be more transparent about their relation with 'extend_recipe_sysroot' --- meta/classes-global/staging.bbclass | 2 ++ meta/classes-recipe/cross.bbclass | 1 + meta/classes-recipe/native.bbclass | 1 + meta/conf/bitbake.conf | 2 +- meta/recipes-core/meta/wic-tools.bb | 1 + meta/recipes-devtools/gcc/gcc-runtime.inc | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass index f0b3c6eedc..5547980ee4 100644 --- a/meta/classes-global/staging.bbclass +++ b/meta/classes-global/staging.bbclass @@ -647,6 +647,7 @@ python extend_recipe_sysroot() { extend_recipe_sysroot[vardepsexclude] += "BB_TASKDEPDATA SSTATETASKS" do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot" +do_prepare_recipe_sysroot[vardepsexclude] += "extend_recipe_sysroot" python do_prepare_recipe_sysroot () { bb.build.exec_func("extend_recipe_sysroot", d) } @@ -665,6 +666,7 @@ python staging_taskhandler() { deps = d.getVarFlag(task, "depends") if task == "do_configure" or (deps and "populate_sysroot" in deps): d.prependVarFlag(task, "prefuncs", "extend_recipe_sysroot ") + d.appendVarFlag(task, "vardepsexclude", " extend_recipe_sysroot") } staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess" addhandler staging_taskhandler diff --git a/meta/classes-recipe/cross.bbclass b/meta/classes-recipe/cross.bbclass index 82a49dc8f5..bceee5d6e6 100644 --- a/meta/classes-recipe/cross.bbclass +++ b/meta/classes-recipe/cross.bbclass @@ -98,6 +98,7 @@ python do_addto_recipe_sysroot () { } addtask addto_recipe_sysroot after do_populate_sysroot do_addto_recipe_sysroot[deptask] = "do_populate_sysroot" +do_addto_recipe_sysroot[vardepsexclude] += "extend_recipe_sysroot" PATH:prepend = "${COREBASE}/scripts/cross-intercept:" diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass index 8aa86f9cb6..b357b2da7b 100644 --- a/meta/classes-recipe/native.bbclass +++ b/meta/classes-recipe/native.bbclass @@ -170,6 +170,7 @@ python do_addto_recipe_sysroot () { } addtask addto_recipe_sysroot after do_populate_sysroot do_addto_recipe_sysroot[deptask] = "do_populate_sysroot" +do_addto_recipe_sysroot[vardepsexclude] += "extend_recipe_sysroot" inherit nopackages diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index bdf37d0da2..1830cab753 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -964,7 +964,7 @@ BB_HASHEXCLUDE_COMMON ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI STAMPS_DIR PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \ CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_NOHASHDIR LICENSE_PATH SDKPKGSUFFIX \ WARN_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \ - BB_WORKERCONTEXT BB_LIMITEDDEPS BB_UNIHASH extend_recipe_sysroot DEPLOY_DIR \ + BB_WORKERCONTEXT BB_LIMITEDDEPS BB_UNIHASH DEPLOY_DIR \ SSTATE_HASHEQUIV_METHOD SSTATE_HASHEQUIV_REPORT_TASKDATA \ SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE GIT_CEILING_DIRECTORIES \ OMP_NUM_THREADS BB_CURRENTTASK" diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/ wic-tools.bb index 823dbe6db6..9a3cf8f371 100644 --- a/meta/recipes-core/meta/wic-tools.bb +++ b/meta/recipes-core/meta/wic-tools.bb @@ -28,4 +28,5 @@ RM_WORK_EXCLUDE += "${PN}" python do_build_sysroot () { bb.build.exec_func("extend_recipe_sysroot", d) } +do_build_sysroot[vardepsexclude] += "extend_recipe_sysroot" addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index e305180c64..15ae9c337f 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -309,6 +309,7 @@ do_check[depends] += "virtual/libc:do_populate_sysroot" do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}" # extend the recipe sysroot to include the built libraries (for qemu usermode) do_check[prefuncs] += "extend_recipe_sysroot" +do_check[vardepsexclude] += "extend_recipe_sysroot" do_check[prefuncs] += "check_prepare" do_check[dirs] = "${WORKDIR}/dejagnu ${B}" do_check[nostamp] = "1" -- 2.34.1 Thanks, Adam > > Cheers, > > Richard >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#240629): https://lists.openembedded.org/g/openembedded-core/message/240629 Mute This Topic: https://lists.openembedded.org/mt/118895154/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
