Skip to contentSkip to conversation

autotools.bbclass: use ordinary append for file-checksums update

PATCH New Matt Madison 1 participant 2 messages Sep 25, 2021

lore
Share & tools
lore
#0 lore raw

cover autotools.bbclass: use ordinary append for file-checksums update

After the recent site files dependency changes, my automated yocto-check-layer runs started failing the test_machine_signatures check with a bunch of allarch recipes unexpectedly getting different signatures:

AssertionError: The machines have conflicting signatures for some shared tasks:
allarch autoconf-archive:do_configure: 21d06fd9f0dd31138c6c31913d7960850c2cf0b5907abbcd429c4dd1d0a9ee61 (jetson-tx2-devkit) != b36889a1bb652c06672a6586443ae344af48d9eb1c20b4ec0b13a0447126e6ac (qemux86) allarch cantarell-fonts:do_configure: 724242c45694e894841f68bcd51bef4938672ebff2feaa1d32e28225aaf464dd (jetson-tx2-devkit) != d8c5180facd27e338ff681b92b4d210ced91b8aaa813def22d7736d4539b16cc (qemux86) allarch encodings:do_configure: 7948ef565be1538ab0f65a455ad51447cd221e298543188781e74011be2c8720 (jetson-tx2-devkit) != 2a88d5544e64906afb4c0ee41c0cf0a579618218dbea79d4e6b749e279d95f22 (qemux86) allarch font-alias:do_configure: 7fcd9e484e364ec480557c72436b91cbff77b2f9b43696f0a2e3e85b7e5738e2 (jetson-tx2-devkit) != 4067157233d63873d706aa1c11406300889f2ba980ac033db1eb8cbca643942d (qemux86) allarch xcursor-transparent-theme:do_configure: eb46377c6b4d62a61f89cb993e78dcd67b356794fadcc38a8251cb299396ed59 (jetson-tx2-devkit) != 2caf4c7817e7c1770229b9970b9554efad133f4131c994196de5d61405aff63a (qemux86) allarch xorg-minimal-fonts:do_package_write_rpm: a8b8d86a7c315fda9e44fcbc6a00d150f9b9a8617f43279a1bcec08a1debb941 (jetson-tx2-devkit) != dc2ecf9029a051f391760e3317c8fc538d8640f2145af4dd1740db5a227b571a (qemux86)

Switching to a regular assignment, instead of using anonymous python, looks like the right solution.

Matt Madison (1):
autotools.bbclass: use ordinary append for file-checksums update

 meta/classes/autotools.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/1 autotools.bbclass: use ordinary append for file-checksums update

Commit 29daffc2410f06f36b779d5bf1fd1ef6e900ca8f added an anonymous python function to append the site file dependencies for do_configure. This causes any recipe that inherits allarch after autotools to end up with a different set of file checksums for each machine, since the anonymous python would get processed before the TARGET_ARCH changes in allarch.

Use an ordinary += assignment to fix this.

---
 meta/classes/autotools.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/classes/autotools.bbclass +1 -4
index bc0c2ea83e..4ab2460990 100644
@@ -149,10 +149,7 @@ python autotools_aclocals () {
     d.setVar("CONFIG_SITE", " ".join(sitefiles))
 }
 
-python () {
-    sitefiles, searched = siteinfo_get_files(d, sysrootcache=False)
-    d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(searched))
-}
+do_configure[file-checksums] += "${@' '.join(siteinfo_get_files(d, sysrootcache=False)[1])}"
 
 CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am"
 
Signature · 1 line
2.30.2