[1/5] data_smart: Fix overrides file/line message additions

Message ID 20220216113158.2899964-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 551c1cb20fc9b9d0dab5d830182c2bf626e72845
Headers show
Series [1/5] data_smart: Fix overrides file/line message additions | expand

Commit Message

Richard Purdie Feb. 16, 2022, 11:31 a.m. UTC
The overrides warning message is meant to show filename and line
numbers but the variable names are incorrect and this wasn't working.
Fix it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/data_smart.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 543372d153..242476be0e 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -494,10 +494,10 @@  class DataSmart(MutableMapping):
 
         if not var.startswith("__anon_") and ("_append" in var or "_prepend" in var or "_remove" in var):
             info = "%s" % var
-            if "filename" in loginfo:
-                info += " file: %s" % loginfo[filename]
-            if "lineno" in loginfo:
-                info += " line: %s" % loginfo[lineno]
+            if "file" in loginfo:
+                info += " file: %s" % loginfo["file"]
+            if "line" in loginfo:
+                info += " line: %s" % loginfo["line"]
             bb.fatal("Variable %s contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." % info)
 
         self.expand_cache = {}