From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Mike Looijmans <mike.looijmans@topic.nl>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: is standard for COMPATIBLE_MACHINE to use "()" or not?
Date: Fri, 6 Mar 2015 04:35:06 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.11.1503060427330.11154@Device-040570> (raw)
In-Reply-To: <54F9700E.1050501@topic.nl>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2432 bytes --]
On Fri, 6 Mar 2015, Mike Looijmans wrote:
> On 05-03-15 09:43, Robert P. J. Day wrote:
> >
> > a style guide thing ... it appears that COMPATIBLE_MACHINE happily
> > acccepts a matching RE within parentheses or not, is there a
> > preference?
> >
> > also, in checking that, i ran across this in oe-core:
> >
> > linux-yocto_3.14.bb:COMPATIBLE_MACHINE =
> > "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
> > linux-yocto_3.19.bb:COMPATIBLE_MACHINE =
> > "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
> > linux-yocto-dev.bb:COMPATIBLE_MACHINE =
> > "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)"
>
> The regex should have been "qemu(arm|x86|ppc|mips|mips64|x86-64)"
>
> And since "x86-64" already matches "x86", that could have been omitted.
>
> > where the first two recipes list "qemuarm64" but the dev version
> > doesn't ... is that deliberate?
>
> Probably not, but "qemuarm64" matches "qemuarm" already.
more nitpcking pedantry, but as i read it from the python code in
base.bbclass:
need_machine = d.getVar('COMPATIBLE_MACHINE', True)
if need_machine:
import re
compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
for m in compat_machines:
if re.match(need_machine, m):
break
the "re.match"ing does not implicitly anchor the RE to the beginning
or end of string, correct? it couldn't, or "qemuarm64" could not
possibly match "qemuarm".
does that not suggest that one should add those anchors to avoid the
(admittedly unlikely) situation where i define a machine named, say,
"rdayqemux86" which, as i read it, will match a "qemux86" machine even
if i didn't want it to? would i then avoid this by setting:
COMPATIBLE_MACHINE = "^rdayqemu"
to match *all* machines whose names *start* with "rdayqemu"? this
really isn't explained carefully anywhere i can see.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
next prev parent reply other threads:[~2015-03-06 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 8:43 is standard for COMPATIBLE_MACHINE to use "()" or not? Robert P. J. Day
2015-03-06 9:14 ` Mike Looijmans
2015-03-06 9:19 ` Robert P. J. Day
2015-03-06 9:35 ` Robert P. J. Day [this message]
2015-03-06 11:16 ` Mike Looijmans
2015-03-06 11:34 ` Robert P. J. Day
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=alpine.LFD.2.11.1503060427330.11154@Device-040570 \
--to=rpjday@crashcourse.ca \
--cc=mike.looijmans@topic.nl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox