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:37:26 +0000 |
commit | da4c443ac5ae7024d053f7e224c576f750a90085 (patch) | |
tree | 96e49098ad2fdeda27b9644828b9df0297409960 /bitbake/lib/bb/data_smart.py | |
parent | f7fccbe289c216b5bee7336d433589192f9cb6b0 (diff) | |
download | poky-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/data_smart.py')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 7b06d3a107..e7047d79ca 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -546,6 +546,8 @@ class DataSmart(MutableMapping): | |||
546 | shortvar = var.split(":", 1)[0] | 546 | shortvar = var.split(":", 1)[0] |
547 | if shortvar in self._var_renames: | 547 | if shortvar in self._var_renames: |
548 | _print_rename_error(shortvar, loginfo, self._var_renames, fullvar=var) | 548 | _print_rename_error(shortvar, loginfo, self._var_renames, fullvar=var) |
549 | # Mark that we have seen a renamed variable | ||
550 | self.setVar("_FAILPARSINGERRORHANDLED", True) | ||
549 | 551 | ||
550 | self.expand_cache = {} | 552 | self.expand_cache = {} |
551 | parsing=False | 553 | parsing=False |
@@ -737,6 +739,8 @@ class DataSmart(MutableMapping): | |||
737 | 739 | ||
738 | if var in self._var_renames: | 740 | if var in self._var_renames: |
739 | _print_rename_error(var, loginfo, self._var_renames) | 741 | _print_rename_error(var, loginfo, self._var_renames) |
742 | # Mark that we have seen a renamed variable | ||
743 | self.setVar("_FAILPARSINGERRORHANDLED", True) | ||
740 | 744 | ||
741 | if 'op' not in loginfo: | 745 | if 'op' not in loginfo: |
742 | loginfo['op'] = "set" | 746 | loginfo['op'] = "set" |