summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-29 12:57:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-04 12:38:44 +0100
commitead03cae663d19ce202cdfefad50b59ada7f1073 (patch)
tree8dac271bac2bf7345dc0924f1ac0478815686c2a /meta/classes-global/sstate.bbclass
parent4d53374ad22ea67d6b19779ac7563b8900809d61 (diff)
downloadpoky-ead03cae663d19ce202cdfefad50b59ada7f1073.tar.gz
buildhistory: Simplify intercept call sites and drop SSTATEPOSTINSTFUNC usage
We planned to drop SSTATEPOSTINSTFUNC some time ago with the introduction of postfuncs. Finally get around to doing that which should make the buildhistory code a little more readable. Unfortunately ordering the buildhistory function calls after the sstate ones is difficult without coding that into the sstate class. This patch does that to ensure everything functions as expected until we can find a better way. This is still likely preferable than the generic sstate postfuncs support since the function flow is much more readable. (From OE-Core rev: c9e2a8fa2f0305ef1247ec405555612326f798f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global/sstate.bbclass')
-rw-r--r--meta/classes-global/sstate.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index fdd529ee4e..586757afbd 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -161,7 +161,10 @@ python () {
161 d.setVar('SSTATETASKS', " ".join(unique_tasks)) 161 d.setVar('SSTATETASKS', " ".join(unique_tasks))
162 for task in unique_tasks: 162 for task in unique_tasks:
163 d.prependVarFlag(task, 'prefuncs', "sstate_task_prefunc ") 163 d.prependVarFlag(task, 'prefuncs', "sstate_task_prefunc ")
164 d.appendVarFlag(task, 'postfuncs', " sstate_task_postfunc") 164 # Generally sstate should be last, execpt for buildhistory functions
165 postfuncs = (d.getVarFlag(task, 'postfuncs') or "").split()
166 newpostfuncs = [p for p in postfuncs if "buildhistory" not in p] + ["sstate_task_postfunc"] + [p for p in postfuncs if "buildhistory" in p]
167 d.setVarFlag(task, 'postfuncs', " ".join(newpostfuncs))
165 d.setVarFlag(task, 'network', '1') 168 d.setVarFlag(task, 'network', '1')
166 d.setVarFlag(task + "_setscene", 'network', '1') 169 d.setVarFlag(task + "_setscene", 'network', '1')
167} 170}