Message ID | 20250724-bb-defer-bbclasses-v1-1-70f1826d4b83@bootlin.com |
---|---|
State | Accepted |
Headers | show |
Series | doc/bitbake-user-manual-ref-variables: document BB_DEFER_BBCLASSES | expand |
Hi Antonin, On 7/24/25 12:15 PM, Antonin Godard via lists.yoctoproject.org wrote: > Document the BB_DEFER_BBCLASSES variable added in 8e741b2e885a > ("ast/BBHandler: Add support for BB_DEFER_BBCLASSES"). > > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> > --- > .../bitbake-user-manual-metadata.rst | 3 +++ > .../bitbake-user-manual-ref-variables.rst | 19 +++++++++++++++++++ > 2 files changed, 22 insertions(+) > > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > index f60a9d8312..8df81e9b66 100644 > --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > @@ -871,6 +871,9 @@ In all cases, if the expression evaluates to an > empty string, the statement does not trigger a syntax error because it > becomes a no-op. > > +See also :term:`BB_DEFER_BBCLASSES` for automatically promoting classes > +``inherit`` calls to ``inherit_defer``. > + > ``include`` Directive > --------------------- > > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst > index 6be8dbbf63..cc1f74825f 100644 > --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst > +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst > @@ -141,6 +141,25 @@ overview of their function and contents. > The default umask to apply to tasks if specified and no task specific > umask flag is set. > > + :term:`BB_DEFER_BBCLASSES` > + The classes listed in this variable have their :ref:`inherit > + <ref-bitbake-user-manual-metadata-inherit>` calls automatically promoted > + to deferred inherits. See :ref:`inherit_defer > + <ref-bitbake-user-manual-metadata-inherit-defer>` for more information on > + deferred inherits. > + > + This means that if :term:`BB_DEFER_BBCLASSES` is set as follows:: > + > + BB_DEFER_BBCLASSES = "foo" > + > + The following statement:: > + > + inherit foo > + > + Will automatically be equal to calling:: > + > + inherit_defer foo > + Reading this I was wondering whether BB_DEFER_BBCLASSES needed to be set before the inherit statement for it to apply, but quickly looking at the code, it doesn't seem like this limitation exists? Additionally, is there a typical use-case users would encounter that would require this? I can see that in poky we use it for native inherit which I believe we ask people to always inherit last in a recipe? Maybe this is something we could document in YP docs also? That is defaults to "native nativesdk cross crosssdk" and that you typically want to add to this variable and not override it (I'm guessing?). Cheers, Quentin
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst index f60a9d8312..8df81e9b66 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst @@ -871,6 +871,9 @@ In all cases, if the expression evaluates to an empty string, the statement does not trigger a syntax error because it becomes a no-op. +See also :term:`BB_DEFER_BBCLASSES` for automatically promoting classes +``inherit`` calls to ``inherit_defer``. + ``include`` Directive --------------------- diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst index 6be8dbbf63..cc1f74825f 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst @@ -141,6 +141,25 @@ overview of their function and contents. The default umask to apply to tasks if specified and no task specific umask flag is set. + :term:`BB_DEFER_BBCLASSES` + The classes listed in this variable have their :ref:`inherit + <ref-bitbake-user-manual-metadata-inherit>` calls automatically promoted + to deferred inherits. See :ref:`inherit_defer + <ref-bitbake-user-manual-metadata-inherit-defer>` for more information on + deferred inherits. + + This means that if :term:`BB_DEFER_BBCLASSES` is set as follows:: + + BB_DEFER_BBCLASSES = "foo" + + The following statement:: + + inherit foo + + Will automatically be equal to calling:: + + inherit_defer foo + :term:`BB_DISKMON_DIRS` Monitors disk space and available inodes during the build and allows you to control the build based on these parameters.
Document the BB_DEFER_BBCLASSES variable added in 8e741b2e885a ("ast/BBHandler: Add support for BB_DEFER_BBCLASSES"). Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- .../bitbake-user-manual-metadata.rst | 3 +++ .../bitbake-user-manual-ref-variables.rst | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) --- base-commit: 5ba7c2f0797a72536a81f57276d4e5c75f23011c change-id: 20250724-bb-defer-bbclasses-072454260def Best regards, -- Antonin Godard <antonin.godard@bootlin.com>