summaryrefslogtreecommitdiffstats
path: root/meta/classes/externalsrc.bbclass
diff options
context:
space:
mode:
authorPeter Suti <peter.suti@streamunlimited.com>2023-07-31 11:34:15 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-11 09:35:40 +0100
commitee4667a24ccdd8c9d547e73aecf661e6a1283890 (patch)
tree52dcd9e5dbee1541fa0eed68c3b0869e040bf5af /meta/classes/externalsrc.bbclass
parent1feb5274db6e985e10f58359b148dabb4076917a (diff)
downloadopenembedded-core-ee4667a24ccdd8c9d547e73aecf661e6a1283890.tar.gz
externalsrc: fix dependency chain issues
Instead of deleting setscene tasks, now SSTATE_SKIP_CREATION is set instead. This seems to fix the compile issues where the populate_sysroot task was not run when an externalsrc recipe was built as a dependency. [YOCTO #15164] [RP addition: The deltask was added by me in 2012 when the class was created. The trouble is bitbake assumes 'sstate' tasks have a setscene task and by deleting the setscene task, bitbake stops thinking the task can be accelerated. There is other code in the sysroot code which assumes some tasks are always sstate tasks. We cannot delete the task without changes to the way bitbake learns about 'setscene' tasks so the patch is correct, avoiding creating files is the better approach given the way the world works now. There would be concerns about exisitng sstate reuse however this shouldn't occur since SRC_URI changes and that will change the underlying hashes. Hash equivalency could potentially cause issues by joining hashes together again however if the output matches, that shouldn't in theory cause any issue.] Signed-off-by: Peter Suti <peter.suti@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-rw-r--r--meta/classes/externalsrc.bbclass7
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index b00fdba8e9..aedd78a03a 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -75,6 +75,8 @@ python () {
# Dummy value because the default function can't be called with blank SRC_URI
d.setVar('SRCPV', '999')
+ # sstate is never going to work for external source trees, disable it
+ d.setVar('SSTATE_SKIP_CREATION', '1')
if d.getVar('CONFIGUREOPT_DEPTRACK') == '--disable-dependency-tracking':
d.setVar('CONFIGUREOPT_DEPTRACK', '')
@@ -82,10 +84,7 @@ python () {
tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys())
for task in tasks:
- if task.endswith("_setscene"):
- # sstate is never going to work for external source trees, disable it
- bb.build.deltask(task, d)
- elif os.path.realpath(d.getVar('S')) == os.path.realpath(d.getVar('B')):
+ if os.path.realpath(d.getVar('S')) == os.path.realpath(d.getVar('B')):
# Since configure will likely touch ${S}, ensure only we lock so one task has access at a time
d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")