[OE-core] [PATCH v4] base.bbclass: Fix matching of MACHINEOVERRIDES in COMPATIBLE_MACHINE

Phil Blundell pb at pbcl.net
Tue Apr 9 10:05:11 UTC 2013


On Mon, 2013-04-08 at 18:42 -0300, Otavio Salvador wrote:
> When a MACHINEOVERRIDES has more than one value, split by ':' as usual
> OVERRIDES, this were not being properly checked in COMPATIBLE_MACHINE
> matching as we need to iterate over each SoC family and check if it is
> compatible or not.

[...]

>              import re
> -            this_machine = d.getVar('MACHINE', True)
> -            if this_machine and not re.match(need_machine, this_machine):
> -                this_soc_family = d.getVar('SOC_FAMILY', True)
> -                if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
> -                    raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine)
> +            compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
> +            for m in compat_machines:
> +                if re.match(need_machine, m):

The checkin comment above doesn't really capture the semantic changes
going on in this patch.  The comment implies that there was previously
an issue with MACHINEOVERRIDES not being split when it contains multiple
entries, but this is misleading: prior to this patch, COMPATIBLE_MACHINE
wasn't being matched against MACHINEOVERRIDES at all.  So, the effect of
this is that anything in MACHINEOVERRIDES (which could potentially be
quite a large set of strings) will be considered as a candidate for
matching COMPATIBLE_MACHINE.

It's not abundantly clear to me whether this is a good thing or not, but
it certainly ought to be accurately described in the commit log.

p.






More information about the Openembedded-core mailing list