[OE-core] more pedantry: inconsistent presentation of how to introduce layers

Martin Jansa martin.jansa at gmail.com
Tue Jul 24 09:29:26 UTC 2012


On Tue, Jul 24, 2012 at 11:15 AM, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> On Tuesday 24 July 2012 05:04:25 Robert P. J. Day wrote:
>>   i asked about this not that long ago but i'm still a bit puzzled --
>> what's the best practice for adding new layers in terms of how
>> bblayers.conf and the various layer.conf files are defined?
>>
>>   the default layer.conf for oe-core contains:
>>
>> BBPATH .= ":${LAYERDIR}"
>> ...
>> BBFILE_PRIORITY_normal = "5"
>>
>> so, clearly, the oe-core layer is being *appended* to whatever is in
>> BBPATH.  ok, let's go with that.
>
> FWIW, this was a relatively recent change.
>
>>   on the other hand, that same file for the meta-yocto layer contains:
>>
>> BBPATH := "${LAYERDIR}:${BBPATH}"
>> ...
>> BBFILE_PRIORITY_yocto = "5"
>>
>> so it's being *prepended*.  is that deliberate?
>
> Not sure, but being kind of like a distro layer it's not unreasonable to
> expect that classes and conf files in it will take precedence. That said in
> most cases we probably ought to be consistent and stick to appending to
> BBPATH.
>
>> the end result is that my BBPATH is:
>>
>> /home/rpjday/yocto/git/meta-yocto:/home/rpjday/yocto/builds/bbc4:/home/rpjda
>> y/yocto/git/meta
>>
>> which clearly represents:
>>
>>  * the yocto layer
>>  * my build layer
>>  * the oe-core layer
>>
>> with both the yocto and oe-core layer having priority 5.  is there no
>> chance of confusion here?
>
> As I mentioned before, the priority currently has no bearing on the order of
> BBPATH - that is determined by the order in which the layer conf files are
> parsed and (as you highlight) whether they prepend or append to BBPATH.
> Remember that the BBPATH only affects how class and conf files are found - it
> does not have anything to do with recipes.

And order of .bbappends applied, no? In case some recipe has
.bbappends in multiple layers and
later layer is trying to override some setting which is also altered
by some bbappend in layer between.

>
>>   in addition, the yocto development manual itself, in section 4.1.2
>> on layers, stresses the use of:
>>
>> BBPATH := "${LAYERDIR}:${BBPATH}"
>>
>> but every single meta-openembedded sub-layer uses the *other* form:
>>
>> BBPATH .= ":${LAYERDIR}"
>
> Again, only as of quite recently - something we should correct in the manual
> though.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list