[PATCH] sb/config.py: Fix operator reconstruction

Vijay Kumar Banerjee vijay at rtems.org
Thu Mar 11 16:55:39 UTC 2021


Hi,

Pushed the patches to upstream and 5. Thank you!

Best regards,
Vijay

On Thu, Mar 11, 2021 at 9:46 AM Vijay Kumar Banerjee <vijay at rtems.org> wrote:
>
> Hi Ricardo and Gedare,
>
> On Thu, Mar 11, 2021 at 8:27 AM Gedare Bloom <gedare at rtems.org> wrote:
> >
> > Looks alright, Vijay can you push?
> >
> Tested with PowerPC tool chain and net legacy build. Works great. I'll
> push the patch to upstream and to 5 with a different ticket.
>
> > On Thu, Mar 11, 2021 at 12:32 AM Ricardo Cárdenes <rcardenes at gemini.edu> wrote:
> > >
> > > Close #4335
> > > ---
> > >  source-builder/sb/config.py | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py
> > > index d3ba6cd..5bc96e2 100644
> > > --- a/source-builder/sb/config.py
> > > +++ b/source-builder/sb/config.py
> > > @@ -991,9 +991,9 @@ class file:
> > >              else:
> > >                  if len(ifls) >= 3:
> > >                      for op in ['==', '!=', '>=', '=>', '=<', '<=', '>', '<']:
> > > -                        ops = s.split(op)
> > > -                        if len(ops) == 2:
> > > -                            ifls = (ops[0], op, ops[1])
> > > +                        if op in ifls:
> > > +                            op_pos = ifls.index(op)
> > > +                            ifls = (' '.join(ifls[:op_pos]), op, ' '.join(ifls[op_pos + 1:]))
>
> Thanks Ricardo! This looks great.
> > >                              break
> > >                  if len(ifls) != 3:
> > >                       self._error('malformed if: ' + reduce(add, ls, ''))
> > > --
> > > 2.27.0
> > >
> > > _______________________________________________
> > > devel mailing list
> > > devel at rtems.org
> > > http://lists.rtems.org/mailman/listinfo/devel
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list