From da4c443ac5ae7024d053f7e224c576f750a90085 Mon Sep 17 00:00:00 2001 From: Marta Rybczynska Date: Mon, 21 Feb 2022 18:44:59 +0100 Subject: bitbake: lib/bb: fix exit when found renamed variables Until now, if a renamed variable was found, bitbake exited immediately if it was in a class, but continued after an error message if the variable was in a recipe. This was caused by cookerdata.py CookerDataBuilder::parseBaseConfiguration checking a different DataSmart instance than the variable was set in. To solve the issue, add a special variable and set it when we find a renamed variable. Check for it in ast.py and bail out if needed. (Bitbake rev: d12400600e30549c88dc9e7883dc3d63b1dc1117) Signed-off-by: Marta Rybczynska Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/ast.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/parse/ast.py') diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 31bcc8e7ac..4b1b44ce19 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py @@ -333,6 +333,10 @@ def runAnonFuncs(d): def finalize(fn, d, variant = None): saved_handlers = bb.event.get_handlers().copy() try: + # Found renamed variables. Exit immediately + if d.getVar("_FAILPARSINGERRORHANDLED", False) == True: + raise bb.BBHandledException() + for var in d.getVar('__BBHANDLERS', False) or []: # try to add the handler handlerfn = d.getVarFlag(var, "filename", False) -- cgit v1.2.3-54-g00ecf