summaryrefslogtreecommitdiffstats
path: root/bitbake
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-08 23:40:59 +0000
commite0218edf840bafa187fab1edb475e28bc2fa618c (patch)
treee7b7e9bb83da6124e48b508ab2e1eaa39bec7caf /bitbake
parentfb2300c144bde40bec766aafbc72d1cfdf793af7 (diff)
downloadpoky-e0218edf840bafa187fab1edb475e28bc2fa618c.tar.gz
bitbake: parse/ast: Show errors 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: ae2b34285f8b3a1a3067c5e9b5d29e32e68c75f1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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..93cbf285ef 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"]:
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']