Skip to contentSkip to conversation

Remove 'extend_recipe_sysroot' from 'BB_HASHEXCLUDE_COMMON'

PATCH New Adam Blank 1 participant 7 messages Jul 18

lore
Share & tools
lore

Adam Blank

author
#0 lore raw

v2 cover Remove 'extend_recipe_sysroot' from 'BB_HASHEXCLUDE_COMMON'

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.camel@linuxfoundation.org/

---
Changes in v2:
- Leave the mechanism in effect, but move it to the staging class
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Adam Blank (6):
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'
gcc-runtime: add 'extend_recipe_sysroot' to 'vardepsexclude' bitbake.conf: remove 'extend_recipe_sysroot' from BB_HASHEXCLUDE_COMMON

 meta/classes-global/staging.bbclass       | 3 ++-
 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(+), 2 deletions(-)

---
base-commit: 171af3b2915dd076c8d1b205ff75eac1ebd5a586
change-id: 20260418-extend_recipe_sysroot-d958ba9cfa9a

Best regards,

Signature · 1 line
Adam Blank <[email protected]>
author
#1 lore raw

PATCH v2 1/6 staging: add 'extend_recipe_sysroot' to 'vardepsexclude'

'do_prepare_recipe_sysroot' did not declare this explicitly, but made use of the fact, that 'extend_recipe_sysroot' is ignored on the base hash level.
Also for cached tasks, when prepending them with 'extend_recipe_sysroot', exclude it from their signatures.

---
 meta/classes-global/staging.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-global/staging.bbclass +2 -1
index f0b3c6eedc..5833abebc8 100644
@@ -650,6 +650,7 @@ do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot"
 python do_prepare_recipe_sysroot () {
     bb.build.exec_func("extend_recipe_sysroot", d)
 }
+do_prepare_recipe_sysroot[vardepsexclude] += "extend_recipe_sysroot"
 addtask do_prepare_recipe_sysroot before do_configure after do_fetch
 
 python staging_taskhandler() {
@@ -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
@@ -700,4 +702,3 @@ python target_add_sysroot_deps () {
     d.setVar("HASHEQUIV_EXTRA_SIGDATA", "\n".join("%s: %s" % (k, deps[k]) for k in sorted(deps.keys())))
 }
 SSTATECREATEFUNCS += "target_add_sysroot_deps"
-
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH v2 2/6 cross: add 'extend_recipe_sysroot' to 'vardepsexclude'

In reply to Adam Blank

'do_addto_recipe_sysroot' did not declare this explicitly, but made use of the fact, that 'extend_recipe_sysroot' is ignored on the base hash level.

---
 meta/classes-recipe/cross.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-recipe/cross.bbclass +1 -0
index 82a49dc8f5..bceee5d6e6 100644
@@ -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:"
 
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH v2 3/6 native: add 'extend_recipe_sysroot' to 'vardepsexclude'

In reply to Adam Blank

'do_addto_recipe_sysroot' did not declare this explicitly, but made use of the fact, that 'extend_recipe_sysroot' is ignored on the base hash level.

---
 meta/classes-recipe/native.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-recipe/native.bbclass +1 -0
index 8aa86f9cb6..b357b2da7b 100644
@@ -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
 
Signature · 1 line
2.43.0
author
#4 lore raw

PATCH v2 4/6 wic-tool: add 'extend_recipe_sysroot' to 'vardepsexclude'

In reply to Adam Blank

'do_build_sysroot' did not declare this explicitly,
but made use of the fact, that 'extend_recipe_sysroot' is
ignored on the base hash level.

---
 meta/recipes-core/meta/wic-tools.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/wic-tools.bb +1 -0
index 823dbe6db6..88fd2dfc19 100644
@@ -29,3 +29,4 @@ python do_build_sysroot () {
     bb.build.exec_func("extend_recipe_sysroot", d)
 }
 addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build
+do_build_sysroot[vardepsexclude] += "extend_recipe_sysroot"
\ No newline at end of file
Signature · 1 line
2.43.0
author
#5 lore raw

PATCH v2 5/6 gcc-runtime: add 'extend_recipe_sysroot' to 'vardepsexclude'

In reply to Adam Blank

'do_check' did not declare this explicitly,
but made use of the fact, that 'extend_recipe_sysroot' is ignored on the base hash level.

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-runtime.inc +1 -0
index e305180c64..15ae9c337f 100644
@@ -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"
Signature · 1 line
2.43.0
author
#6 lore raw

PATCH v2 6/6 bitbake.conf: remove 'extend_recipe_sysroot' from BB_HASHEXCLUDE_COMMON

In reply to Adam Blank

'extend_recipe_sysroot' can and should be handled just like any other function. Fine grained use of 'vardepsexclude' is capable of achieving the same effect as ingoring 'extend_recipe_sysroot' on the base hash level, but with a better visibility, and is a more uniform approach.

---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
index bdf37d0da2..1830cab753 100644
@@ -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"
Signature · 1 line
2.43.0