From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH 2/3] BBHandler: Make inherit calls more directly
Date: Wed, 10 Aug 2022 14:43:36 +0100 [thread overview]
Message-ID: <20220810134337.420149-2-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <20220810134337.420149-1-richard.purdie@linuxfoundation.org>
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>
---
lib/bb/parse/parse_py/BBHandler.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 532a4e08f1..1189114341 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):
--
2.34.1
next prev parent reply other threads:[~2022-08-10 13:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 13:43 [PATCH 1/3] BBHandler: Allow earlier exit for classes not found Richard Purdie
2022-08-10 13:43 ` Richard Purdie [this message]
2022-08-10 13:43 ` [PATCH 3/3] BBHandler/cooker: Implement recipe and global classes Richard Purdie
2022-08-10 15:55 ` [bitbake-devel] [PATCH 1/3] BBHandler: Allow earlier exit for classes not found Khem Raj
2022-08-10 16:19 ` Richard Purdie
2022-08-10 16:27 ` Christopher Larson
2022-08-10 16:34 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220810134337.420149-2-richard.purdie@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.