All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Christopher Larson <kergoth@gmail.com>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] base.bbclass: fix COMPATIBLE_MACHINE
Date: Mon, 11 Apr 2016 09:10:56 +0800	[thread overview]
Message-ID: <570AF9A0.5010503@windriver.com> (raw)
In-Reply-To: <CABcZAN=d3EAENtVr2XJm=rO8nNAy9B9NWcJh5b7mjcdV6wfGvg@mail.gmail.com>



On 04/11/2016 01:30 AM, Christopher Larson wrote:
> On Sun, Apr 10, 2016 at 7:16 AM Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> 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 <liezhi.yang@windriver.com
>     <mailto:liezhi.yang@windriver.com>>
>
>
> 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.



  reply	other threads:[~2016-04-11  1:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 14:14 [PATCH 0/1] base.bbclass: fix COMPATIBLE_MACHINE Robert Yang
2016-04-10 14:14 ` [PATCH 1/1] " Robert Yang
2016-04-10 17:30   ` Christopher Larson
2016-04-11  1:10     ` Robert Yang [this message]
2016-04-10 19:06   ` Denys Dmytriyenko
2016-04-11  1:17     ` Robert Yang
2016-04-11  1:56       ` Christopher Larson
2016-04-11  2:11         ` Robert Yang
2016-04-11  2:29           ` Denys Dmytriyenko
2016-04-11 13:12             ` Denys Dmytriyenko
2016-04-11  8:29           ` Richard Purdie
2016-04-11  8:33             ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570AF9A0.5010503@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=kergoth@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.