Skip to contentSkip to conversation

setting of BBPATH differs between ref manual and actual layer.conf file

DISCUSSION Robert P. J. Day 3 participants 4 messages Mar 21, 2012

lore
Share & tools
lore
#0 lore raw

admittedly picky but the ref manual here:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-changes-layers

shows a sample setting of BBPATH in yocto's layer.conf:

  BBPATH := "${BBPATH}:${LAYERDIR}"

however the actual layer.conf for yocto reads:

  BBPATH := "${LAYERDIR}:${BBPATH}"

should the ordering be consistent here? should readers be warned about the (admittedly remote) possibility of weirdness if they happen to try to include two layers with the same name? is that even possible? does any of this even matter?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 9 lines · Robert P. J. Day

admittedly picky but the ref manual here:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-changes-layers

shows a sample setting of BBPATH in yocto's layer.conf:

  BBPATH := "${BBPATH}:${LAYERDIR}"
Quoted 8 lines

however the actual layer.conf for yocto reads:

  BBPATH := "${LAYERDIR}:${BBPATH}"

should the ordering be consistent here? should readers be warned about the (admittedly remote) possibility of weirdness if they happen to try to include two layers with the same name? is that even possible? does any of this even matter?

i really hate replying to my own posts because i forgot to do
something basic, but i did a quick grep:

$ grep -r "BBPATH :=" *
documentation/dev-manual/dev-manual-common-tasks.xml:     BBPATH := "${LAYERDIR}:${BBPATH}"
documentation/dev-manual/dev-manual-kernel-appendix.xml:     BBPATH := "${BBPATH}:${LAYERDIR}"
documentation/bsp-guide/bsp.xml:     BBPATH := "${BBPATH}:${LAYERDIR}"
meta-hob/conf/layer.conf:BBPATH := "${BBPATH}:${LAYERDIR}"
meta-skeleton/conf/layer.conf:BBPATH := "${BBPATH}:${LAYERDIR}"
meta-yocto/conf/layer.conf:BBPATH := "${LAYERDIR}:${BBPATH}"
$

so there's a mixture of that ordering. if there's no real reason
for that, it should really be consistent so readers don't wonder about it.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#2 lore raw
Quoted 32 lines · Robert P. J. Day
Quoted 9 lines · Robert P. J. Day

admittedly picky but the ref manual here:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-changes-layers

shows a sample setting of BBPATH in yocto's layer.conf:

   BBPATH := "${BBPATH}:${LAYERDIR}"
Quoted 8 lines

however the actual layer.conf for yocto reads:

   BBPATH := "${LAYERDIR}:${BBPATH}"

should the ordering be consistent here? should readers be warned about the (admittedly remote) possibility of weirdness if they happen to try to include two layers with the same name? is that even possible? does any of this even matter?

i really hate replying to my own posts because i forgot to do
something basic, but i did a quick grep:

$ grep -r "BBPATH :=" *
documentation/dev-manual/dev-manual-common-tasks.xml:     BBPATH := "${LAYERDIR}:${BBPATH}"
documentation/dev-manual/dev-manual-kernel-appendix.xml:     BBPATH := "${BBPATH}:${LAYERDIR}"
documentation/bsp-guide/bsp.xml:     BBPATH := "${BBPATH}:${LAYERDIR}"
meta-hob/conf/layer.conf:BBPATH := "${BBPATH}:${LAYERDIR}"
meta-skeleton/conf/layer.conf:BBPATH := "${BBPATH}:${LAYERDIR}"
meta-yocto/conf/layer.conf:BBPATH := "${LAYERDIR}:${BBPATH}"
$
Quoted 3 lines

so there's a mixture of that ordering. if there's no real reason
for that, it should really be consistent so readers don't wonder about it.

Indeed it does matter, as does the order that these statements are processed (which I think is the order the layers are listed in bblayers.conf?) It can matter if two layers contain the same .conf file [at least]. I experienced this when I had two layers with abi_version.conf - actually three: meta, meta-yocto and meta-MINE - and I got very confused when I removed meta-yocto from the mix :-( The ordering of BBPATH isn't as important with recipes as they use the layer priority mechanism, but if you had two layers with identical priorities and recipes, it might matter as well.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
Quoted 2 lines · On Wednesday 21 March 2012 05:23:07 Gary Thomas wrote:

Indeed it does matter, as does the order that these statements are processed (which I think is the order the layers are listed in bblayers.conf?)

Correct - each layer's layer.conf will be read in the order the layers are listed in bblayers.conf. Since variables such as BBPATH are usually appended or prepended within layer.conf, you will get different final values depending on the order they are listed.

Quoted 4 lines

It can matter if two layers contain the same .conf file [at least]. I experienced this when I had two layers with abi_version.conf - actually
three: meta, meta-yocto and meta-MINE - and I got very confused when I removed meta-yocto from the mix :-(

I have to say, IMHO it is best practice to not expect to be able to change your layer configuration and keep the same previously-built TMPDIR contents. Now that we've enabled OEBasicHash (in Poky) that will protect you against most changes that could result from playing around with your layer config by forcing a rebuild of the affected recipes, but if you don't have that enabled it's entirely possible the contents of your TMPDIR (sysroots, output packages, etc.) will no longer match up with the metadata.

Quoted 3 lines

The ordering of BBPATH isn't as important with recipes as they use the layer priority mechanism, but if you had two layers with identical priorities and recipes, it might matter as well.

BBPATH only influences how class, configuration and include files are found. It has no effect on searching for recipes themselves.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre