[bitbake-devel] [PATCH] cooker.py: allow dangling bbappends if explicitly whitelisted

Mark Hatle mark.hatle at windriver.com
Fri Jun 2 13:26:15 UTC 2017


On 6/2/17 7:58 AM, Richard Purdie wrote:
> On Mon, 2017-05-22 at 12:50 +0200, Patrick Ohly wrote:
>> Having a .bbappend without corresponding .bb file triggers an error
>> or
>> at least warning, depending on the global
>> BB_DANGLINGAPPENDS_WARNONLY.
>>
>> Some layers (for example, meta-freescale) avoid that message by only
>> adding .bbappends to the BBFILES when the layers they apply to are
>> present. Others (like intel-iot-refkit) avoid such .bbappends by
>> falling back to global assignments with _pn-<recipe> as override.
>> Both
>> is complicated.
>>
>> Now the warning code checks BBAPPENDS_DANGLING_WHITELIST and ignores
>> all bbappends which match a file pattern in that list. This is an
>> easier way to have bbappends which may or may not apply to an
>> existing recipe.
>>
>> Example usage:
>>
>>   # We have recipes-* directories, add to BBFILES
>>   BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
>> 	${LAYERDIR}/optional-bbappends/recipes-*/*/*.bbappend \
>> 	${LAYERDIR}/recipes-*/*/*.bbappend"
>>
>>   # Several of our *.bbappends might be for layers that are not
>>   # guaranteed to be present. Don't warn or even error out because
>>   # of those.
>>   BBAPPENDS_DANGLING_WHITELIST += "${LAYERDIR}/optional-
>> bbappends/recipes-*/*/*.bbappend"
> 
> I've been giving this some thought. The freescale layer approach does
> have ordering issues which I don't like. Equally, Chris' comment about
> this is also a valid concern. Experience suggests saying the layer
> maintainer needs to be careful doesn't work in practise.
> 
> I'm wondering if there is a hybrid solution if we extend this syntax a
> little, e.g.:
> 
> BBFILES_DYNAMIC += "\
>     XXXX:${LAYERDIR}/optional-bbappends-XXX/recipes-*/*/*.bbappend
>     YYYY:${LAYERDIR}/optional-bbappends-YYY/recipes-*/*/*.bbappend
> "
> 
> so that the code only applies these BBFILES entries if the layer named
> in the first parameter is present?
> 
> This would happen at the end of parsing so ordering becomes a moot
> point. The direction you stack BBFILES_DYANMIC in would determin
> bbappend application order.
> 
> How does that sound to people?

That sounds reasonable to me, and has a precedent in the package_dynamic as well.

--Mark

> Cheers,
> 
> Richard
> 




More information about the bitbake-devel mailing list