From: "Eric Bénard" <eric@eukrea.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: OpenEmbedded Core Mailing List
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] base.bbclass: Fix matching of SOC_FAMILY in COMPATIBLE_MACHINE
Date: Sun, 7 Apr 2013 07:37:45 +0200 [thread overview]
Message-ID: <20130407073745.54c2d0e8@e6520eb> (raw)
In-Reply-To: <CAP9ODKoG2xAL+45oqL++9rWWGC+CRBQyFa3jtX-fFUYKdvCOMA@mail.gmail.com>
Le Sat, 6 Apr 2013 17:58:30 -0300,
Otavio Salvador <otavio@ossystems.com.br> a écrit :
> On Sat, Apr 6, 2013 at 3:02 PM, Eric Bénard <eric@eukrea.com> wrote:
> > Hi Otavio,
> >
> > Le Sat, 6 Apr 2013 14:17:48 -0300,
> > Otavio Salvador <otavio@ossystems.com.br> a écrit :
> >
> >> When a SOC_FAMILY 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.
> >>
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> ---
> >> meta/classes/base.bbclass | 12 +++++++-----
> >> 1 file changed, 7 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> >> index abd6a52..6f24064 100644
> >> --- a/meta/classes/base.bbclass
> >> +++ b/meta/classes/base.bbclass
> >> @@ -515,11 +515,13 @@ python () {
> >> need_machine = d.getVar('COMPATIBLE_MACHINE', True)
> >> if need_machine:
> >> 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('MACHINE', True)]
> >> + compat_machines.extend((d.getVar('SOC_FAMILY', True) or "").split(":"))
> >> + for this_machine in compat_machines:
> >> + if re.match(need_machine, this_machine):
> >> + break
> >> + else:
> >> + raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine)
> >>
> > aren't you breaking this log here vs what is was supposed to
> > print before ?
>
> The 'else' is used when no 'break' is done inside of for loop.
>
but will this_machine contain the value of the MACHINE variable ?
Eric
next prev parent reply other threads:[~2013-04-07 5:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-06 17:17 [PATCH] base.bbclass: Fix matching of SOC_FAMILY in COMPATIBLE_MACHINE Otavio Salvador
2013-04-06 18:02 ` Eric Bénard
2013-04-06 20:58 ` Otavio Salvador
2013-04-07 5:37 ` Eric Bénard [this message]
2013-04-08 13:31 ` Otavio Salvador
2013-04-08 13:37 ` Eric Bénard
2013-04-08 13:44 ` Otavio Salvador
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=20130407073745.54c2d0e8@e6520eb \
--to=eric@eukrea.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=otavio@ossystems.com.br \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox