[bitbake-devel] [WIP 0/2] Adding support for shell arithmetics

Olof Johansson olof.johansson at axis.com
Fri Jun 14 13:55:45 UTC 2013


On 2013-05-07 11:22, Olof Johansson wrote:
> Hi,
> 
> A week or so I found out that shell fragments in bitbake recipes
> don't support shell arithmetics (`$((1+1))`). The reason for this
> is the shell lexing throwing NotImplemented exceptions. I've made
> some progress in adding support for shell arithmetics, but I have
> a hard time getting support for corner cases.
> 
> It was suprising to see that currently, only a subset of posix
> shell scripts is supported, even though they are sent through to
> be executed by the system shell. I think I understand the reason
> for having to do the shell lexing; knowing what functions and
> variables to export right? But I wonder if it's possible to do
> the shell lexing as a best effort, and ignore any errors.
> 
> What are the risks with this approach? Is it feasibile to do so?
> 
> This patch series is a work in progress, and does support the use
> cases we had issues with, however, I currently skip one unit
> test, as I can't get it to work. Comments and feedback much
> appreciated!

Did anybody have any feedback on this? I have had a hard time
understanding the design of the lexing. I really could use some
pointers --- is there some documents somewhere that could make me
understand it better? I haven't had time to work on this lately,
but it would be great to get this fixed, so I figured I'll try to
take some time in the near future.

/Olof

PS. Saw that RP merged the exception message patch, thanks :).



More information about the bitbake-devel mailing list