From 12d7157a4145062bfba74dadd493ae870852e7e3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 10 Aug 2022 13:43:43 +0100 Subject: bitbake: BBHandler: Make inherit calls more directly Rather than recursing into the conf handler code, simply call into the parse code directly when inheriting files as we've already resolved the paths and don't need anything the other codepath brings. This makes the codepath clearer at the expense of some slight duplication. (Bitbake rev: 0f4f3af6d93a0018df58b8a1d8d423c78ba6526d) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/BBHandler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/parse/parse_py/BBHandler.py') diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 532a4e08f1..1189114341 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -63,7 +63,10 @@ def inherit(files, fn, lineno, d): logger.debug("Inheriting %s (from %s:%d)" % (file, fn, lineno)) __inherit_cache.append( file ) d.setVar('__inherit_cache', __inherit_cache) - include(fn, file, lineno, d, "inherit") + try: + bb.parse.handle(file, d, True) + except (IOError, OSError) as exc: + raise ParseError("Could not inherit file %s: %s" % (fn, exc.strerror), fn, lineno) __inherit_cache = d.getVar('__inherit_cache', False) or [] def get_statements(filename, absolute_filename, base_name): -- cgit v1.2.3-54-g00ecf