diff options
author | Marta Rybczynska <rybczynska@gmail.com> | 2022-02-21 18:44:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 23:36:48 +0000 |
commit | d12400600e30549c88dc9e7883dc3d63b1dc1117 (patch) | |
tree | 8222b39e45e699737bf52746a27b6120af2945fd /lib/bb/data_smart.py | |
parent | bc27762bf3ffb4a20b58eace5302438c4a526626 (diff) | |
download | bitbake-d12400600e30549c88dc9e7883dc3d63b1dc1117.tar.gz |
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.
Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r-- | lib/bb/data_smart.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 7b06d3a10..e7047d79c 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -546,6 +546,8 @@ class DataSmart(MutableMapping): shortvar = var.split(":", 1)[0] if shortvar in self._var_renames: _print_rename_error(shortvar, loginfo, self._var_renames, fullvar=var) + # Mark that we have seen a renamed variable + self.setVar("_FAILPARSINGERRORHANDLED", True) self.expand_cache = {} parsing=False @@ -737,6 +739,8 @@ class DataSmart(MutableMapping): if var in self._var_renames: _print_rename_error(var, loginfo, self._var_renames) + # Mark that we have seen a renamed variable + self.setVar("_FAILPARSINGERRORHANDLED", True) if 'op' not in loginfo: loginfo['op'] = "set" |