summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/ast.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-04 13:37:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-10 19:25:38 +0000
commit02f36dc832ae786dd0f790d86820611a71f0b960 (patch)
treee6e241630f62c8aa6249f961721ae11b19df4580 /bitbake/lib/bb/parse/ast.py
parentd922f577ae6174ebba20b131850d81a9d62fa29a (diff)
downloadpoky-02f36dc832ae786dd0f790d86820611a71f0b960.tar.gz
bitbake: parse/ast: Show warnings for append/prepend/remove operators combined with +=/.=
Operations like XXX:append += "YYY" are almost always wrong and this is a common mistake made in the metadata. Show warnings for these usages with a view to making it a fatal error eventually. (Bitbake rev: 8c31e75557dc6a8d8f407b5d24d6327889a3e3b1) 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 743ea0dfc0..31bcc8e7ac 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -130,6 +130,10 @@ class DataNode(AstNode):
130 else: 130 else:
131 val = groupd["value"] 131 val = groupd["value"]
132 132
133 if ":append" in key or ":remove" in key or ":prepend" in key:
134 if op in ["append", "prepend", "postdot", "predot", "ques"]:
135 bb.warn(key + " " + groupd[op] + " is not a recommended operator combination, please replace it.")
136
133 flag = None 137 flag = None
134 if 'flag' in groupd and groupd['flag'] is not None: 138 if 'flag' in groupd and groupd['flag'] is not None:
135 flag = groupd['flag'] 139 flag = groupd['flag']