From e20af03c0210a0a0af1a5daad7cf859ea3e70cc5 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 6 Jun 2025 11:45:45 +0100 Subject: bitbake: event: Add event for deferred inherits Now that deferred inherits are extension specific, we can pass this list to an event, which our metadata can use to set class overrides earlier (as an example). There are limitations to this, the list of classes is unexpanded and recursive classes are not visible. There isn't much that can be done about this, the ones we are interested in would usually be visible at the top level (such as class extensions). (Bitbake rev: 205d461c05fc7b4a7c81039af3bc3fd71cbb982c) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/ast.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake/lib/bb/parse/ast.py') diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index f9998798d8..5a086b4e95 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py @@ -471,6 +471,9 @@ def finalize(fn, d, variant = None): if d.getVar("_FAILPARSINGERRORHANDLED", False) == True: raise bb.BBHandledException() + inherits = [x[0] for x in (d.getVar('__BBDEFINHERITS', False) or [('',)])] + bb.event.fire(bb.event.RecipePreDeferredInherits(fn, inherits), d) + while True: inherits = d.getVar('__BBDEFINHERITS', False) or [] if not inherits: -- cgit v1.2.3-54-g00ecf