All of lore.kernel.org
 help / color / mirror / Atom feed
* confusing note in dev manual about search order for layers
@ 2021-08-29 12:52 Robert P. J. Day
  2021-08-30  7:41 ` [docs] " Quentin Schulz
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2021-08-29 12:52 UTC (permalink / raw)
  To: YP docs mailing list


  in section 3.1.9 of dev manual:

https://docs.yoctoproject.org/dev-manual/common-tasks.html#adding-a-layer-using-the-bitbake-layers-script

one reads the note:

"During a build, the OpenEmbedded build system looks in the layers
from the top of the list down to the bottom in that order."

ok, except it's not at all clear what the consequence of that is.
looks for what? what is the significance of that search order to the
developer?

rday

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

* Re: [docs] confusing note in dev manual about search order for layers
  2021-08-29 12:52 confusing note in dev manual about search order for layers Robert P. J. Day
@ 2021-08-30  7:41 ` Quentin Schulz
  2021-08-30  9:00   ` Peter Kjellerstedt
  0 siblings, 1 reply; 3+ messages in thread
From: Quentin Schulz @ 2021-08-30  7:41 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: YP docs mailing list

Hi Robert,

On Sun, Aug 29, 2021 at 08:52:42AM -0400, Robert P. J. Day wrote:
> 
>   in section 3.1.9 of dev manual:
> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org_dev-2Dmanual_common-2Dtasks.html-23adding-2Da-2Dlayer-2Dusing-2Dthe-2Dbitbake-2Dlayers-2Dscript&d=DwIBAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=mVZiXFV_cVQVdgl1QOxle8X44ftmg_wTdRhHpubvgnI&s=5pEBxWBXxmuUiL2gZv_9GyOl4bi2YEQSOwhj70Kxt9A&e= 
> 
> one reads the note:
> 
> "During a build, the OpenEmbedded build system looks in the layers
> from the top of the list down to the bottom in that order."
> 
> ok, except it's not at all clear what the consequence of that is.
> looks for what? what is the significance of that search order to the
> developer?
> 

My guess:
All layer.conf are parsed in the order specified in bblayers.conf. This
includes specifically BBPATH, to which layers usually append to with .=.
This variable defines the layer precedence for classes and conf files (e.g.
distro, machine, others?) selection when there's name conflict.
Apparently it is used for require/include with "relative-to-layer-root"
path (as opposed to "relative-to-recipe-file" path) too from what I read
on IRC.

Hope this helps and is not too far from the truth :)
Cheers,
Quentin

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

* Re: [docs] confusing note in dev manual about search order for layers
  2021-08-30  7:41 ` [docs] " Quentin Schulz
@ 2021-08-30  9:00   ` Peter Kjellerstedt
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2021-08-30  9:00 UTC (permalink / raw)
  To: Quentin Schulz, Robert P. J. Day; +Cc: YP docs mailing list

> -----Original Message-----
> From: docs@lists.yoctoproject.org <docs@lists.yoctoproject.org> On Behalf
> Of Quentin Schulz
> Sent: den 30 augusti 2021 09:42
> To: Robert P. J. Day <rpjday@crashcourse.ca>
> Cc: YP docs mailing list <docs@lists.yoctoproject.org>
> Subject: Re: [docs] confusing note in dev manual about search order for
> layers
> 
> Hi Robert,
> 
> On Sun, Aug 29, 2021 at 08:52:42AM -0400, Robert P. J. Day wrote:
> >
> >   in section 3.1.9 of dev manual:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__docs.yoctoproject.org_dev-2Dmanual_common-2Dtasks.html-23adding-2Da-
> 2Dlayer-2Dusing-2Dthe-2Dbitbake-2Dlayers-
> 2Dscript&d=DwIBAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSq
> HGq8yBP6m6qZZ4njZguQhZhkI_-
> 172IIy1t&m=mVZiXFV_cVQVdgl1QOxle8X44ftmg_wTdRhHpubvgnI&s=5pEBxWBXxmuUiL2gZ
> v_9GyOl4bi2YEQSOwhj70Kxt9A&e=
> >
> > one reads the note:
> >
> > "During a build, the OpenEmbedded build system looks in the layers
> > from the top of the list down to the bottom in that order."
> >
> > ok, except it's not at all clear what the consequence of that is.
> > looks for what? what is the significance of that search order to the
> > developer?
> >
> 
> My guess:
> All layer.conf are parsed in the order specified in bblayers.conf. This
> includes specifically BBPATH, to which layers usually append to with .=.
> This variable defines the layer precedence for classes and conf files (e.g.
> distro, machine, others?) selection when there's name conflict.
> Apparently it is used for require/include with "relative-to-layer-root"
> path (as opposed to "relative-to-recipe-file" path) too from what I read
> on IRC.
> 
> Hope this helps and is not too far from the truth :)
> Cheers,
> Quentin

If you want bitbake to find configuration files etc as per Quentin's 
description above in the same order as it applies bbappend files, then 
you need to list the layers in bblayers.conf in reverse priority 
according to BBFILE_PRIORITY. This is because BBFILES is searched 
according to BBFILE_PRIORITY, whereas BBPATH is searched from left to 
right. I.e., the layers in bblayers.conf should look something like this
if you use poky and some openembedded layers:

BBLAYERS ?= " \
  .../meta-mylayer \
  .../meta-webserver \
  .../meta-multimedia \
  .../meta-filesystems \
  .../meta-networking \
  .../meta-python \
  .../meta-oe \
  .../meta-poky \
  .../meta \
  "

The only exception to this that I know about is meta-poky, which for 
unknown reasons uses =. instead of .= when it adds itself to BBPATH. 
This makes it very hard to exactly match the ordering, but as long as 
you don't need to override poky-sanity.bbclass in your own layer, this 
is normally not a problem.

//Peter


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

end of thread, other threads:[~2021-08-30  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 12:52 confusing note in dev manual about search order for layers Robert P. J. Day
2021-08-30  7:41 ` [docs] " Quentin Schulz
2021-08-30  9:00   ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.