waf bsp_defaults sometimes includes multiple BSPs

Joel Sherrill joel at rtems.org
Fri Oct 2 14:26:31 UTC 2020


On Fri, Oct 2, 2020 at 12:57 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 01/10/2020 23:38, Joel Sherrill wrote:
>
> > I am generating a uniquely named ini file per BSP. In doing an ls -l,
> > I noticed the size varied by at least a factor of three. This is
> > because when some BSPs are put in, the entire family is being
> > included.  I suspected this happens when a BSP name matches the family
> > name but leon3 doesn't trip this behavior. Here is an example:
> >
> > config-arm-lpc32xx_mzx.ini:[arm/lpc32xx_mzx]
> > config-arm-lpc32xx_mzx.ini:[arm/lpc32xx_mzx_stage_1]
> > config-arm-lpc32xx_mzx.ini:[arm/lpc32xx_mzx_stage_2]
> >
> > I don't think this behavior is correct. I am asking for the bsp
> > defaults for a single BSP variant.
>
> I guess you refer to the behaviour of:
>
>      --rtems-bsps=REGEX,...
>                          a comma-separated list of Python regular
> expressions which select the desired BSP variants (e.g. 'sparc/erc32');
> it may be used in the bsp_defaults and bsp_list commands
>
> It is currently used like this:
>
> def is_in_white_list(variant, white_list):
>      if not white_list:
>          return True
>      for pattern in white_list:
>          if re.search(pattern, variant):
>              return True
>      return False
>
> Maybe we should change it to:
>
> def is_in_white_list(variant, white_list):
>      if not white_list:
>          return True
>      for pattern in white_list:
>          if re.match(pattern + "$", variant):
>              return True
>      return False
>

Yes. That would seem to be more right. Should it have a ^ at the front?
I think we want an exact match versus a partial one.

--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201002/f9b5720a/attachment.html>


More information about the devel mailing list