All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] BBHandler: Allow earlier exit for classes not found
@ 2022-08-10 13:43 Richard Purdie
  2022-08-10 13:43 ` [PATCH 2/3] BBHandler: Make inherit calls more directly Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Richard Purdie @ 2022-08-10 13:43 UTC (permalink / raw)
  To: bitbake-devel

Rather than relying on later code to error if the class isn't found,
exit earlier and more clearly from a code perspective.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/parse/parse_py/BBHandler.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 68415735fd..532a4e08f1 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -56,6 +56,9 @@ def inherit(files, fn, lineno, d):
             if abs_fn:
                 file = abs_fn
 
+        if not os.path.exists(file):
+            raise ParseError("Could not inherit file %s" % (file), fn, lineno)
+
         if not file in __inherit_cache:
             logger.debug("Inheriting %s (from %s:%d)" % (file, fn, lineno))
             __inherit_cache.append( file )
-- 
2.34.1



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

end of thread, other threads:[~2022-08-10 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 13:43 [PATCH 1/3] BBHandler: Allow earlier exit for classes not found Richard Purdie
2022-08-10 13:43 ` [PATCH 2/3] BBHandler: Make inherit calls more directly Richard Purdie
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

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.