Bug 11314

Summary: shell parser: support $(( ))
Product: [Build System, Metadata & Runtime] BitBake Reporter: Patrick Ohly <patrick.ohly>
Component: bitbakeAssignee: Mark <mark.asselstine>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: mark.asselstine, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie, ross.burton
Version: unspecified   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Patrick Ohly 2017-04-10 08:58:11 UTC
The modern equivalent of `expr 1 + 1` is $(( 1 + 1 )), but that is not supported by the shell parser embedded in bitbake. Adding support for it would be useful.
Comment 1 Ross Burton 2022-10-20 15:26:11 UTC
Just tested, still doesn't parse.
Comment 2 Mark 2022-11-07 21:20:03 UTC
I'll try to have a look at this one over the next week. I am in the area having just worked on the python code snippets so should be able to slide over to this without a big context switch. I will grab the defect after a quick poke around to ensure I am not biting off something I can't chew.
Comment 3 Mark 2023-01-27 14:46:31 UTC
I have looked into this recently. It is fairly straightforward to get basic cases supported but to implement this in full and correctly it is going to take time. The combination of this being a multi-character delimiter, support for nesting and the '$' being allowed to be dropped inside this compound command all contribute to this being non-trivial. I do intend to continue to plug away at this, so stay tuned.