diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/machine-overrides-extender.bbclass | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/classes/machine-overrides-extender.bbclass b/classes/machine-overrides-extender.bbclass index 6c2ec32e..7aaae858 100644 --- a/classes/machine-overrides-extender.bbclass +++ b/classes/machine-overrides-extender.bbclass | |||
@@ -12,14 +12,10 @@ | |||
12 | # | 12 | # |
13 | # MACHINEOVERRIDES_EXTENDER_FILTER_OUT_override = "group1 group2" | 13 | # MACHINEOVERRIDES_EXTENDER_FILTER_OUT_override = "group1 group2" |
14 | # | 14 | # |
15 | # Copyright 2016-2017 (C) O.S. Systems Software LTDA. | 15 | # Copyright 2016-2018 (C) O.S. Systems Software LTDA. |
16 | 16 | ||
17 | def machine_overrides_extender(d): | 17 | def machine_overrides_extender(d): |
18 | variant = d.getVar("BBEXTENDVARIANT") | 18 | machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES', True) or '').split(':') |
19 | if variant: | ||
20 | return | ||
21 | |||
22 | machine_overrides = (d.getVar('MACHINEOVERRIDES', True) or '').split(':') | ||
23 | 19 | ||
24 | # Gather the list of overrides to filter out | 20 | # Gather the list of overrides to filter out |
25 | machine_overrides_filter_out = [] | 21 | machine_overrides_filter_out = [] |
@@ -43,11 +39,18 @@ def machine_overrides_extender(d): | |||
43 | index = machine_overrides.index(override) | 39 | index = machine_overrides.index(override) |
44 | for e in extender: | 40 | for e in extender: |
45 | machine_overrides.insert(index, e) | 41 | machine_overrides.insert(index, e) |
46 | d.setVar('MACHINEOVERRIDES', ':'.join(machine_overrides)) | 42 | |
43 | return ':'.join(machine_overrides) | ||
47 | 44 | ||
48 | python machine_overrides_extender_handler() { | 45 | python machine_overrides_extender_handler() { |
49 | machine_overrides_extender(e.data) | 46 | # Ideally we'd use a separate variable name for this however |
47 | # historically NXP BSPs used this. We save it to a known good name | ||
48 | # so we can reprocess OVERRIDES if/as/when needed. | ||
49 | d.renameVar("MACHINEOVERRIDES", "PRISTINE_MACHINEOVERRIDES") | ||
50 | |||
51 | # Now we add our own function intercept in instead | ||
52 | d.setVar("MACHINEOVERRIDES", "${@machine_overrides_extender(d)}:") | ||
50 | } | 53 | } |
51 | 54 | ||
52 | machine_overrides_extender_handler[eventmask] = "bb.event.RecipePreFinalise" | 55 | machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed" |
53 | addhandler machine_overrides_extender_handler | 56 | addhandler machine_overrides_extender_handler |