Skip to contentSkip to conversation

lib/bb/parse/ast.py: exit immediately when fragement is not found

PATCH New [email protected] 1 participant 1 message Nov 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/bb/parse/ast.py: exit immediately when fragement is not found

From: Chen Qi <[email protected]>

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.

---
 bitbake/lib/bb/parse/ast.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/parse/ast.py +1 -1
index cfead466e1..1351315d78 100644
@@ -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))
Signature · 1 line
2.34.1