diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-04-08 18:42:44 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-09 13:19:43 +0100 |
commit | 9bb5eb86c12ba6598fe317f449171fdf2310b933 (patch) | |
tree | a756263698cf27be2b4657ca299b5643fdcd5cd9 /meta | |
parent | 977ea67ea58cbab244668c93c8df5ea73b1361e5 (diff) | |
download | poky-9bb5eb86c12ba6598fe317f449171fdf2310b933.tar.gz |
base.bbclass: Fix matching of MACHINEOVERRIDES in COMPATIBLE_MACHINE
The use of SOC_FAMILY here is old code and SOC_FAMILY is now implemented by
MACHINEOVERRIDES behind the scenes. It therefore makes more sense to use
the replacement value in this code. Just like SOC_FAMILY, this is a ":"
delimited variable so we should iterate over the components, not use
the value directly.
Finally, MACHINEOVERRIDES contains MACHINE so we don't need to check that
directly.
This makes the functionality match what most users would expect it to do
and is also compatible with the way things previously worked.
(From OE-Core rev: 8ceef74dd4f662b4c7e3c170ce486e966ebebeff)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/base.bbclass | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index abd6a526c3..641316d1fa 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -515,11 +515,12 @@ python () { | |||
515 | need_machine = d.getVar('COMPATIBLE_MACHINE', True) | 515 | need_machine = d.getVar('COMPATIBLE_MACHINE', True) |
516 | if need_machine: | 516 | if need_machine: |
517 | import re | 517 | import re |
518 | this_machine = d.getVar('MACHINE', True) | 518 | compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":") |
519 | if this_machine and not re.match(need_machine, this_machine): | 519 | for m in compat_machines: |
520 | this_soc_family = d.getVar('SOC_FAMILY', True) | 520 | if re.match(need_machine, m): |
521 | if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family: | 521 | break |
522 | raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine) | 522 | else: |
523 | raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True)) | ||
523 | 524 | ||
524 | 525 | ||
525 | bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split() | 526 | bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split() |