summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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:07 +0100
commit29daffc2410f06f36b779d5bf1fd1ef6e900ca8f (patch)
tree4a37778fcba82324114abd2f9bd9e08fd424f0ec /meta/recipes-core
parent55623420208bc4c77a61492d2bbcbc71d3123acd (diff)
downloadopenembedded-core-29daffc2410f06f36b779d5bf1fd1ef6e900ca8f.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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/meta/meta-environment.bb5
-rw-r--r--meta/recipes-core/meta/meta-ide-support.bb6
2 files changed, 11 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index 27f0103665..7118fb2aef 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -47,6 +47,11 @@ python do_generate_content() {
}
addtask generate_content before do_install after do_compile
+python () {
+ sitefiles, searched = siteinfo_get_files(d, sysrootcache=False)
+ d.appendVarFlag("do_generate_content", "file-checksums", " " + " ".join(searched))
+}
+
create_sdk_files() {
# Setup site file for external use
toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb
index 768f6f4bb6..5b23f78e51 100644
--- a/meta/recipes-core/meta/meta-ide-support.bb
+++ b/meta/recipes-core/meta/meta-ide-support.bb
@@ -12,4 +12,10 @@ do_populate_ide_support () {
toolchain_create_tree_env_script
}
+python () {
+ sitefiles, searched = siteinfo_get_files(d, sysrootcache=False)
+ d.setVar("CONFIG_SITE", " ".join(sitefiles))
+ d.appendVarFlag("do_populate_ide_support", "file-checksums", " " + " ".join(searched))
+}
+
addtask populate_ide_support before do_build after do_install