diff mbox series

[bitbake-devel] lib/bb/parse/ast.py: exit immediately when fragement is not found

Message ID 20251103072032.1015053-1-Qi.Chen@windriver.com
State New
Headers show
Series [bitbake-devel] lib/bb/parse/ast.py: exit immediately when fragement is not found | expand

Commit Message

ChenQi Nov. 3, 2025, 7:20 a.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

When some specified fragement is not found, then the build results
are usually not what the user wants. So instead of print out an error
message and allow the build to continue, we'd better just exit
immediately to save time and resources.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 bitbake/lib/bb/parse/ast.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index cfead466e1..1351315d78 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -410,7 +410,7 @@  class AddFragmentsNode(AstNode):
                     data.setVarFlag(flagged_var, f, val)
                     data.setVar(flagged_var, None)
             else:
-                bb.error("Could not find fragment {} in enabled layers: {}".format(f, layers))
+                bb.fatal("Could not find fragment {} in enabled layers: {}".format(f, layers))
 
 def handleInclude(statements, filename, lineno, m, force):
     statements.append(IncludeNode(filename, lineno, m.group(1), force))