summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-10 13:43:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-10 14:41:44 +0100
commit0f4f3af6d93a0018df58b8a1d8d423c78ba6526d (patch)
tree99f163aaf8a80cc9ea2db84aa9af47ba5d16ca49
parentf7c55c8147329670fd5bc55b1ae3f47f25b89bab (diff)
downloadbitbake-0f4f3af6d93a0018df58b8a1d8d423c78ba6526d.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 532a4e08f..118911434 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/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):