diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-03-02 20:21:54 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2022-03-03 10:41:35 -0300 |
commit | bfa2a3b98dde2a664615fe4a2527fd89b0c8dfbe (patch) | |
tree | 3609de3cd02c929e329f875cf42d433e3be6febb /classes | |
parent | 286385e3b2b6d6b4c60faf14fd3170ec2279139e (diff) | |
download | meta-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.bbclass | 19 |
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 | ||
56 | machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed" | 56 | machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed" |
57 | addhandler machine_overrides_extender_handler | 57 | addhandler machine_overrides_extender_handler |
58 | |||
59 | python 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 | |||
75 | machineoverrides_filtered_out_qa_handler[eventmask] = "bb.event.RecipeParsed" | ||
76 | addhandler machineoverrides_filtered_out_qa_handler | ||