Openembedded Core Discussions
 help / color / mirror / Atom feed
* more pedantry: inconsistent presentation of how to introduce layers
@ 2012-07-24  9:04 Robert P. J. Day
  2012-07-24  9:15 ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2012-07-24  9:04 UTC (permalink / raw)
  To: OE Core mailing list


  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.

  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?  the end result is
that my BBPATH is:

/home/rpjday/yocto/git/meta-yocto:/home/rpjday/yocto/builds/bbc4:/home/rpjday/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?

  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}"

  anyone reading the manual and trying to match it up to the code is
bound to get confused.  thoughts?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: more pedantry: inconsistent presentation of how to introduce layers
  2012-07-24  9:04 more pedantry: inconsistent presentation of how to introduce layers Robert P. J. Day
@ 2012-07-24  9:15 ` Paul Eggleton
  2012-07-24  9:20   ` Paul Eggleton
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-07-24  9:15 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: openembedded-core

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.

>   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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: more pedantry: inconsistent presentation of how to introduce layers
  2012-07-24  9:15 ` Paul Eggleton
@ 2012-07-24  9:20   ` Paul Eggleton
  2012-07-24  9:25   ` Robert P. J. Day
  2012-07-24  9:29   ` Martin Jansa
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-07-24  9:20 UTC (permalink / raw)
  To: openembedded-core

On Tuesday 24 July 2012 10:15:32 Paul Eggleton wrote:
> > but every single meta-openembedded sub-layer uses the *other* form:
> > 
> > BBPATH .= ":${LAYERDIR}"
> 
> Again, only as of quite recently

Actually it seems that may not be true. This change was made in May 2011. 

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: more pedantry: inconsistent presentation of how to introduce layers
  2012-07-24  9:15 ` Paul Eggleton
  2012-07-24  9:20   ` Paul Eggleton
@ 2012-07-24  9:25   ` Robert P. J. Day
  2012-07-24  9:29   ` Martin Jansa
  2 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2012-07-24  9:25 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Tue, 24 Jul 2012, Paul Eggleton wrote:

> On Tuesday 24 July 2012 05:04:25 Robert P. J. Day wrote:
... snip ...
> > 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.

  oh, gack, i'd forgotten that, sorry.  it's early.  need coffee.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: more pedantry: inconsistent presentation of how to introduce layers
  2012-07-24  9:15 ` Paul Eggleton
  2012-07-24  9:20   ` Paul Eggleton
  2012-07-24  9:25   ` Robert P. J. Day
@ 2012-07-24  9:29   ` Martin Jansa
  2012-07-24  9:43     ` Paul Eggleton
  2 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2012-07-24  9:29 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Jul 24, 2012 at 11:15 AM, Paul Eggleton
<paul.eggleton@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@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: more pedantry: inconsistent presentation of how to introduce layers
  2012-07-24  9:29   ` Martin Jansa
@ 2012-07-24  9:43     ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-07-24  9:43 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Tuesday 24 July 2012 11:29:26 Martin Jansa wrote:
> > 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.

No. The order of bbappend application is layer priority order, or if bbappends 
for the same recipe are in layers with the same layer priority, the order is 
the order in which the layers are parsed (= the order in which the layers 
appear in bblayers.conf).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-24  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24  9:04 more pedantry: inconsistent presentation of how to introduce layers Robert P. J. Day
2012-07-24  9:15 ` Paul Eggleton
2012-07-24  9:20   ` Paul Eggleton
2012-07-24  9:25   ` Robert P. J. Day
2012-07-24  9:29   ` Martin Jansa
2012-07-24  9:43     ` Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox