From ead03cae663d19ce202cdfefad50b59ada7f1073 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 29 Aug 2024 12:57:40 +0100 Subject: 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 --- meta/classes-global/sstate.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/classes-global') 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 () { d.setVar('SSTATETASKS', " ".join(unique_tasks)) for task in unique_tasks: d.prependVarFlag(task, 'prefuncs', "sstate_task_prefunc ") - d.appendVarFlag(task, 'postfuncs', " sstate_task_postfunc") + # Generally sstate should be last, execpt for buildhistory functions + postfuncs = (d.getVarFlag(task, 'postfuncs') or "").split() + newpostfuncs = [p for p in postfuncs if "buildhistory" not in p] + ["sstate_task_postfunc"] + [p for p in postfuncs if "buildhistory" in p] + d.setVarFlag(task, 'postfuncs', " ".join(newpostfuncs)) d.setVarFlag(task, 'network', '1') d.setVarFlag(task + "_setscene", 'network', '1') } -- cgit v1.2.3-54-g00ecf