summaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-21 12:47:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-23 13:49:11 +0100
commit3dfd4ed0ef61daa55745b3ab378593e653562a30 (patch)
treef8ba443877d58a480681a9d975221eb9fa2f4ab1 /meta/classes/autotools.bbclass
parent282d596b8cc81d650b6d20c6131fdc236bad2c20 (diff)
downloadpoky-3dfd4ed0ef61daa55745b3ab378593e653562a30.tar.gz
siteinfo/autotools: Ensure task checksums reflect site files
Currently, if you change the site files, nothing rebuilds since they are not accounted for in task checksums. They could/should be through the file-checksums task flag. We need to cache all the files looked for, whether the exist or not so that if they do exist and didn't, the checksum also changes. This gets complicated by the need to clean out hardcoded build paths from the variable and that other layers can have site files. This patch adds this functionality. A new variable, SITEINFO_PATHVARS is added which controls which substitutions to make on the file-checksum values to remove the hardcoded paths. Layers adding site files will need to set this to a variable that has the layer path in it and is excluded from task hashes (COREBASE is the one the core layer uses). This patch will cause yocto-check-layer to fail for some layers where site files are added yet the layer isn't a machine specific layer. This is arguable correct since these additional site files apply to all recipes and things from a layer like core could be changed by such changes so it is right they should rebuild. There is a determinism issue potentially there if not. meta-openembedded does have some such references but looking at them they should move to core or likely just be removed as most look obsolete anyway. [YOCTO #13729] (From OE-Core rev: 29daffc2410f06f36b779d5bf1fd1ef6e900ca8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r--meta/classes/autotools.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 2c7968e659..bc0c2ea83e 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -145,7 +145,13 @@ ACLOCALEXTRAPATH:class-target = " -I ${STAGING_DATADIR_NATIVE}/aclocal/"
145ACLOCALEXTRAPATH:class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" 145ACLOCALEXTRAPATH:class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/"
146 146
147python autotools_aclocals () { 147python autotools_aclocals () {
148 d.setVar("CONFIG_SITE", siteinfo_get_files(d, sysrootcache=True)) 148 sitefiles, searched = siteinfo_get_files(d, sysrootcache=True)
149 d.setVar("CONFIG_SITE", " ".join(sitefiles))
150}
151
152python () {
153 sitefiles, searched = siteinfo_get_files(d, sysrootcache=False)
154 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(searched))
149} 155}
150 156
151CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am" 157CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am"