summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-03-02 20:21:54 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2022-03-03 10:41:35 -0300
commitbfa2a3b98dde2a664615fe4a2527fd89b0c8dfbe (patch)
tree3609de3cd02c929e329f875cf42d433e3be6febb /classes
parent286385e3b2b6d6b4c60faf14fd3170ec2279139e (diff)
downloadmeta-freescale-bfa2a3b98dde2a664615fe4a2527fd89b0c8dfbe.tar.gz
Ensure we fail if old SoC overrides are in usetopic/warn-old-overrides
To assist existing layers to convert to the new BSP-specific overrides. Besides failing the parsing of the recipes where it is in use, we provide a script to automate most of it. Fixes: #990. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'classes')
-rw-r--r--classes/machine-overrides-extender.bbclass19
1 files changed, 19 insertions, 0 deletions
diff --git a/classes/machine-overrides-extender.bbclass b/classes/machine-overrides-extender.bbclass
index b9b00ebe..58cb45b1 100644
--- a/classes/machine-overrides-extender.bbclass
+++ b/classes/machine-overrides-extender.bbclass
@@ -55,3 +55,22 @@ python machine_overrides_extender_handler() {
55 55
56machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed" 56machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed"
57addhandler machine_overrides_extender_handler 57addhandler machine_overrides_extender_handler
58
59python machineoverrides_filtered_out_qa_handler() {
60 filtered_out = (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT') or "").split()
61 qa_error = d.getVar('MACHINEOVERRIDES_FILTERED_OUT_QA_ERROR')
62
63 for var in d.overridedata:
64 # We need to allow the overrides being used in the extender
65 # so avoid processing it.
66 if 'MACHINEOVERRIDES_EXTENDER' in var:
67 continue
68
69 for (r, o) in d.overridedata[var]:
70 common = list(set(o.split(":")).intersection(filtered_out))
71 if len(common) > 0:
72 raise bb.parse.SkipRecipe(qa_error % common)
73}
74
75machineoverrides_filtered_out_qa_handler[eventmask] = "bb.event.RecipeParsed"
76addhandler machineoverrides_filtered_out_qa_handler