All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof.johansson@axis.com>
To: "bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>
Subject: Re: [WIP 0/2] Adding support for shell arithmetics
Date: Fri, 14 Jun 2013 15:55:45 +0200	[thread overview]
Message-ID: <20130614135545.GE13277@axis.com> (raw)
In-Reply-To: <1367918558-16136-1-git-send-email-olof.johansson@axis.com>

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 :).


  parent reply	other threads:[~2013-06-14 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07  9:22 [WIP 0/2] Adding support for shell arithmetics Olof Johansson
2013-05-07  9:22 ` [WIP 1/2] pysh: Say what kind of token isn't implemented Olof Johansson
2013-05-07  9:22 ` [WIP 2/2] initial work on supporting shell arith Olof Johansson
2013-06-14 13:55 ` Olof Johansson [this message]
2013-06-17 16:36   ` [WIP 0/2] Adding support for shell arithmetics Richard Purdie

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=20130614135545.GE13277@axis.com \
    --to=olof.johansson@axis.com \
    --cc=bitbake-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.