public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
* [bitbake-devel PATCH] doc: bitbake-user-manual: document inherit_defer
@ 2024-11-18 15:36 Antonin Godard
  2024-11-18 15:44 ` [bitbake-devel] " Quentin Schulz
  0 siblings, 1 reply; 3+ messages in thread
From: Antonin Godard @ 2024-11-18 15:36 UTC (permalink / raw)
  To: bitbake-devel; +Cc: docs, Thomas Petazzoni, Yoann Congal, Antonin Godard

This was added in 2.7.2. Add it as a subsection of the inherit
directive.

Fixes [YOCTO #15640].

Reported-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index 58975f4c88ce549a2fd27136c0cb37b636bafcdb..ab16ddde3cf837092d4c43e467b4becceae23b27 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -840,6 +840,19 @@ 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.
 
+``inherit_defer`` Directive
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``inherit_defer`` directive works like the ``inherit`` directive, except
+that it is only evaluated at the end of parsing. Its usage is recommended when a
+conditional expression is used. For example::
+
+   inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)}
+
+This allows conditional expressions to be evaluated "late", meaning changes
+to the variable after the line is parsed will take effect. With the ``inherit``
+directive this is not the case.
+
 ``include`` Directive
 ---------------------
 

---
base-commit: 40ca2b66df610ac74918edf54369781f52b03728
change-id: 20241118-inherit-defer-48d3c8e0c087

Best regards,
-- 
Antonin Godard <antonin.godard@bootlin.com>



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

end of thread, other threads:[~2024-11-18 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18 15:36 [bitbake-devel PATCH] doc: bitbake-user-manual: document inherit_defer Antonin Godard
2024-11-18 15:44 ` [bitbake-devel] " Quentin Schulz
2024-11-18 16:04   ` Antonin Godard

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