diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-17 11:54:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 23:37:26 +0000 |
commit | 638869230fb038f630b9dbe64475fa3a1cecc1ed (patch) | |
tree | 627f6d7457d644d0ce4ced99ad37c0386d71258b /bitbake | |
parent | 3ff067647fc0c56f3dd15d07d70bf3a7a496bf4f (diff) | |
download | poky-638869230fb038f630b9dbe64475fa3a1cecc1ed.tar.gz |
bitbake: data_smart: Allow rename mechanism to show full expressions
(Bitbake rev: bac6f7acfd2e6b5b4d6d3a8d40beeff76b215751)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 43d59de550..68bdc3430f 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -513,12 +513,14 @@ class DataSmart(MutableMapping): | |||
513 | def hasOverrides(self, var): | 513 | def hasOverrides(self, var): |
514 | return var in self.overridedata | 514 | return var in self.overridedata |
515 | 515 | ||
516 | def _print_rename_error(self, var, loginfo): | 516 | def _print_rename_error(self, var, loginfo, fullvar=None): |
517 | info = "" | 517 | info = "" |
518 | if "file" in loginfo: | 518 | if "file" in loginfo: |
519 | info = " file: %s" % loginfo["file"] | 519 | info = " file: %s" % loginfo["file"] |
520 | if "line" in loginfo: | 520 | if "line" in loginfo: |
521 | info += " line: %s" % loginfo["line"] | 521 | info += " line: %s" % loginfo["line"] |
522 | if fullvar and fullvar != var: | ||
523 | info += " referenced as: %s" % fullvar | ||
522 | if info: | 524 | if info: |
523 | info = " (%s)" % info.strip() | 525 | info = " (%s)" % info.strip() |
524 | bb.erroronce('Variable %s has been renamed to %s%s' % (var, self._var_renames[var], info)) | 526 | bb.erroronce('Variable %s has been renamed to %s%s' % (var, self._var_renames[var], info)) |
@@ -536,7 +538,7 @@ class DataSmart(MutableMapping): | |||
536 | 538 | ||
537 | shortvar = var.split(":", 1)[0] | 539 | shortvar = var.split(":", 1)[0] |
538 | if shortvar in self._var_renames: | 540 | if shortvar in self._var_renames: |
539 | self._print_rename_error(shortvar, loginfo) | 541 | self._print_rename_error(shortvar, loginfo, fullvar=var) |
540 | 542 | ||
541 | self.expand_cache = {} | 543 | self.expand_cache = {} |
542 | parsing=False | 544 | parsing=False |