[yocto] Literal curly braces inside python expression
Viguera, Javier
Javier.Viguera at digi.com
Fri Mar 10 11:35:10 PST 2017
Hi all,
I'm having a hard time trying to put some literal curly braces in a python expression and I need a bit of help to solve this problem.
I minimal example to reproduce this. If in my recipe i have:
VAR1 = "1"
VAR2 = "${@base_conditional('VAR1', '1', '{ONE}', '{TWO}', d)}"
do_install() {
echo "${VAR2}"
}
Getting the recipe environment I get:
# bitbake -e myrecipe | less
do_install() {
...
echo "${@base_conditional('VAR1', '1', '{ONE}', '{TWO}', d)}"
...
}
So bitbake is not resolving the python expression.
If on the other hand I remove the curly braces:
VAR1 = "1"
VAR2 = "${@base_conditional('VAR1', '1', 'ONE', 'TWO', d)}"
then bitbake solves the expression correctly:
# bitbake -e myrecipe | less
do_install() {
...
echo "ONE"
...
}
But I do need to put those curly braces. Is there a way?
Thanks in advance.
--
Javier Viguera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170310/e858b757/attachment.html>
More information about the yocto
mailing list