[yocto] might it be worth explaining BBMASK more comprehensively?

Tim Bird tim.bird at am.sony.com
Wed Dec 12 12:33:32 PST 2012


On 12/12/2012 11:53 AM, Robert P. J. Day wrote:
> On Wed, 12 Dec 2012, Tim Bird wrote:
>> I don't know if the .= with leading bar is the optimal
>> way to append on to BBMASK, but it seems fairly straightforward
>> to me.  I sometimes use the leading ".*" and sometimes not.
> 
>   it doesn't seem like the leading ".*" makes any difference but
> that's the sort of detail that might confuse a reader and should be
> explained.
> 
>> In my setup it seems to not be required, but maybe for flexibility
>> it should be used.  I'm not sure -- it would depend on whether
>> python re.match or re.search is used for the regex.

Just to answer my own question...

In bitbake in poky-danny-8.0,
(poky-danny-8.0/bitbake/lib/bb/cooker.py)
bbmask_compiled.search() is used, which means that
the leading ".*" is unnecessary.  A python re.search()
can match anywhere in the string, while a python re.match()
must match at the beginning of a string.  Maybe previous
versions of bitbake used re.match()??

In any event, I would think that it should be considered
best practice to NOT include the leading ".*" in BBMASK
regex fragments.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================




More information about the yocto mailing list