[oe] [OE-core] [RFC] Layers, PRINC and bbappends

Paul Barker paul at paulbarker.me.uk
Mon May 27 12:07:26 UTC 2013


On 23 May 2013 03:50, Chris Larson <clarson at kergoth.com> wrote:
> On Wed, May 22, 2013 at 3:14 AM, Phil Blundell <pb at pbcl.net> wrote:
>>
>> On Wed, 2013-05-22 at 09:47 +0100, Paul Barker wrote:
>> > I've just sent a patch to the yocto@ list to fix this but it's brought
>> > up two things:
>> >
>> > 1) In openembedded-core/meta/classes/image.bbclass SPLASH is set with
>> > '?='. I'm overriding this with '=' in
>> > meta-raspberrypi/conf/machine/raspberrypi.conf which means it can't be
>> > overridden further in local.conf. Is this worth changing to '??=' in
>> > image.bbclass, '?=' in the machine conf so that it can be overridden
>> > with '=' in local.conf? Is my understanding of the overrides correct
>> > here?
>>
>> You can always override it from local.conf using a _forcevariable
>> override (which used to be named "_local", in fact, but that terminology
>> turned out to be a bit confusing), or a _MACHINE override of course.  So
>> I don't think there is any major problem here.
>>
>> But, that said, it probably is true that the semantics of ??= are less
>> surprising for users (since it isn't position-dependent in the way
>> that ?= is) which might make it a better choice for image.bbclass.
>
>
> ??= is great in config files, but not ideal in classes that aren't globally
> inherited. If bitbake.conf sets a ??=, and a distro .conf updates the
> default by using ??= again, and then the class uses ??=, it'll replace the
> latest default set by the config. So, I think for default values, classes
> should use ?=, config files should use ??=.

Lets leave this as it is then.

I've had no responses to the second point I made or feedback on my
patch to meta-raspberrypi. I really think it's worth adding a
documentation comment to the psplash recipe to explain the intended
way to customise the splash image as the logic there isn't
straightforward. My approach was to append the image to SPLASH_IMAGES
in a bbappend and then set this as the default via the SPLASH variable
in the machine config file for raspberrypi. I imagine it'd be a
similar approach for setting a distro default. It then ensures that
just including a machine or distro layer with a bbappend to psplash
doesn't force it's image on the user unless they're building for that
machine or distro. Is that the correct approach? If so I'm happy to
submit a patch adding something to this effect as a documentation
comment to the psplash recipe.

--
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the Openembedded-devel mailing list