summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Suti <peter.suti@streamunlimited.com>2023-07-31 11:34:15 +0200
committerSteve Sakoman <steve@sakoman.com>2023-09-23 05:26:15 -1000
commit2b7735291d8df75a08489d5942362e9d526b439a (patch)
treefebc74f99eef6e57d042d538475c62626931a526
parent4682ae38f285f59b68196289ece5802460805201 (diff)
downloadpoky-2b7735291d8df75a08489d5942362e9d526b439a.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.] (From OE-Core rev: f6bb8438a18dfa2a520ad6fa65662d908f4ef0ed) Signed-off-by: Peter Suti <peter.suti@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ee4667a24ccdd8c9d547e73aecf661e6a1283890) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-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 a649bcdff8..97d7379d9f 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -76,6 +76,8 @@ python () {
76 76
77 # Dummy value because the default function can't be called with blank SRC_URI 77 # Dummy value because the default function can't be called with blank SRC_URI
78 d.setVar('SRCPV', '999') 78 d.setVar('SRCPV', '999')
79 # sstate is never going to work for external source trees, disable it
80 d.setVar('SSTATE_SKIP_CREATION', '1')
79 81
80 if d.getVar('CONFIGUREOPT_DEPTRACK') == '--disable-dependency-tracking': 82 if d.getVar('CONFIGUREOPT_DEPTRACK') == '--disable-dependency-tracking':
81 d.setVar('CONFIGUREOPT_DEPTRACK', '') 83 d.setVar('CONFIGUREOPT_DEPTRACK', '')
@@ -83,10 +85,7 @@ python () {
83 tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys()) 85 tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys())
84 86
85 for task in tasks: 87 for task in tasks:
86 if task.endswith("_setscene"): 88 if os.path.realpath(d.getVar('S')) == os.path.realpath(d.getVar('B')):
87 # sstate is never going to work for external source trees, disable it
88 bb.build.deltask(task, d)
89 elif os.path.realpath(d.getVar('S')) == os.path.realpath(d.getVar('B')):
90 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time 89 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time
91 d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") 90 d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
92 91