summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/meta
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/recipes-core/meta
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/recipes-core/meta')
-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() {
47} 47}
48addtask generate_content before do_install after do_compile 48addtask generate_content before do_install after do_compile
49 49
50python () {
51 sitefiles, searched = siteinfo_get_files(d, sysrootcache=False)
52 d.appendVarFlag("do_generate_content", "file-checksums", " " + " ".join(searched))
53}
54
50create_sdk_files() { 55create_sdk_files() {
51 # Setup site file for external use 56 # Setup site file for external use
52 toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS} 57 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 () {
12 toolchain_create_tree_env_script 12 toolchain_create_tree_env_script
13} 13}
14 14
15python () {
16 sitefiles, searched = siteinfo_get_files(d, sysrootcache=False)
17 d.setVar("CONFIG_SITE", " ".join(sitefiles))
18 d.appendVarFlag("do_populate_ide_support", "file-checksums", " " + " ".join(searched))
19}
20
15addtask populate_ide_support before do_build after do_install 21addtask populate_ide_support before do_build after do_install