summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/ast.py
diff options
context:
space:
mode:
authorMarta Rybczynska <rybczynska@gmail.com>2022-02-21 18:44:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-21 23:37:26 +0000
commitda4c443ac5ae7024d053f7e224c576f750a90085 (patch)
tree96e49098ad2fdeda27b9644828b9df0297409960 /bitbake/lib/bb/parse/ast.py
parentf7fccbe289c216b5bee7336d433589192f9cb6b0 (diff)
downloadpoky-da4c443ac5ae7024d053f7e224c576f750a90085.tar.gz
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 <marta.rybczynska@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/ast.py')
-rw-r--r--bitbake/lib/bb/parse/ast.py4
1 files changed, 4 insertions, 0 deletions
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):
333def finalize(fn, d, variant = None): 333def finalize(fn, d, variant = None):
334 saved_handlers = bb.event.get_handlers().copy() 334 saved_handlers = bb.event.get_handlers().copy()
335 try: 335 try:
336 # Found renamed variables. Exit immediately
337 if d.getVar("_FAILPARSINGERRORHANDLED", False) == True:
338 raise bb.BBHandledException()
339
336 for var in d.getVar('__BBHANDLERS', False) or []: 340 for var in d.getVar('__BBHANDLERS', False) or []:
337 # try to add the handler 341 # try to add the handler
338 handlerfn = d.getVarFlag(var, "filename", False) 342 handlerfn = d.getVarFlag(var, "filename", False)