On 04/11/2016 01:30 AM, Christopher Larson wrote:
On Sun, Apr 10, 2016 at 7:16 AM Robert Yang <[email protected]
<mailto:[email protected]>> wrote:

    It mismatched such as qemux86 and qemux86-64 which was incorrect, for
    example:
    COMPATIBLE_MACHINE = "(qemux86)"
    But it treated MACHINE = "qemux86-64" as matched. The similar to others.

    This patch fixes the problem.

    Signed-off-by: Robert Yang <[email protected]
    <mailto:[email protected]>>


Did you verify that no recipes are in fact relying on this behavior? This

This recipe:
meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb:
COMPATIBLE_MACHINE = "(qemux86)"

And only when MACHINE="qemux86" works well, if MACHINE="qemux86-64",
there is no errors or warnings when building, but a lot of unexpected errors
when running.

variable has always been a regex, so this has always been the case. Also the ^

Ah, yes, '^' is not needed, it's a little late last night, so I was confused.
Updated in the repo:

  git://git.openembedded.org/openembedded-core-contrib rbt/base
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/base

Robert Yang (1):
  base.bbclass: fix COMPATIBLE_MACHINE


diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f9697a9..dc43406 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -469,7 +469,7 @@ python () {
         import re
         compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
         for m in compat_machines:
-            if re.match(need_machine, m):
+            if re.match(need_machine + '$', m):
                 break
         else:
raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))

// Robert

is unnecessary, re.match always matches at the beginning of the string,
re.search is the one that does not.

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to