[poky] Error managing features

Chris Larson clarson at kergoth.com
Fri Oct 21 07:14:19 PDT 2011


On Fri, Oct 21, 2011 at 5:02 AM, Gary Thomas <gary at mlbassoc.com> wrote:
> On 2011-10-21 05:50, Gary Thomas wrote:
>>
>> 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?
>
> 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?

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.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics



More information about the poky mailing list