Error managing features
In my $DISTRO, I have a default set of image features:
IMAGE_FEATURES ?= "package-management debug-tweaks "
I'd like to build a minimized image which leaves out the package stuff, so I added this line to my <image>.bb:
IMAGE_FEATURES := "${@oe_filter_out('package-management', '${IMAGE_FEATURES}', d)}"
Sadly, this gives me this error:
ERROR: Failure expanding variable IMAGE_FEATURES[:=], expression was ${@oe_filter_out('package-management', 'package-management debug-tweaks ${EXTRA_IMAGE_FEATURES}', d)} which
triggered exception SyntaxError: EOL while scanning string literal (IMAGE_FEATURES[:=], line 1)
Any idea what I've done wrong?
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 7 lines · Gary Thomas
In my $DISTRO, I have a default set of image features:
IMAGE_FEATURES?= "package-management debug-tweaks "I'd like to build a minimized image which leaves out the package stuff, so I added this line to my <image>.bb:
IMAGE_FEATURES:= "${@oe_filter_out('package-management', '${IMAGE_FEATURES}', d)}"
Quoted 5 lines
Sadly, this gives me this error:
ERROR: Failure expanding variable IMAGE_FEATURES[:=], expression was ${@oe_filter_out('package-management', 'package-management debug-tweaks ${EXTRA_IMAGE_FEATURES}', d)} which triggered exception SyntaxError: EOL while scanning string literal (IMAGE_FEATURES[:=], line 1)Any idea what I've done wrong?
Note: I noticed that EXTRA_IMAGE_FEATURES is only set in a few Yocto images (no default/fallback), so I added
EXTRA_IMAGE_FEATURES ?= ""
to $DISTRO.conf and the syntax error went away.
I guess there must be some difference inside bitbake that manages to ignore unset variables when expanding, but not in this case?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 19 lines · Gary Thomas
Quoted 9 lines · Gary Thomas
In my $DISTRO, I have a default set of image features:
IMAGE_FEATURES?= "package-management debug-tweaks "I'd like to build a minimized image which leaves out the package stuff, so I added this line to my <image>.bb:
IMAGE_FEATURES:= "${@oe_filter_out('package-management', '${IMAGE_FEATURES}', d)}"Quoted 8 lines
Sadly, this gives me this error:
ERROR: Failure expanding variable IMAGE_FEATURES[:=], expression was ${@oe_filter_out('package-management', 'package-management debug-tweaks ${EXTRA_IMAGE_FEATURES}', d)} which
triggered exception SyntaxError: EOL while scanning string literal (IMAGE_FEATURES[:=], line 1)Any idea what I've done wrong?
Quoted 7 lines
Note: I noticed that
EXTRA_IMAGE_FEATURESis only set in a few Yocto images (no default/fallback), so I addedEXTRA_IMAGE_FEATURES?= ""
to $DISTRO.conf and the syntax error went away.I guess there must be some difference inside bitbake that manages to ignore unset variables when expanding, but not in this case?
I really think the current behavior of leaving unset variables in their unexpanded form so that the shell may expand them needs to die. Better to just make it raise an exception, I think. It would help catch bugs, and worst case you define some default values.. heh. In this case, you could also have worked around it by using d.getVar() rather than '${}' in the python snippet.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics