summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Barker <paul@pbarker.dev>2021-07-20 18:16:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-29 23:21:24 +0100
commit261da52339fba3be8f811f2745af0bee8963c2fa (patch)
treeafa6a4b91a3382160ffcc8c9965a8d4fe37c2b9b
parenta83ea01b99d799025caede57512648d3258579d0 (diff)
downloadpoky-261da52339fba3be8f811f2745af0bee8963c2fa.tar.gz
bitbake: parse/ast: Substitute '~' when naming anonymous functions
When parsing an anonymous python function, bitbake generates a name for the function based on the full path to the file in which it was found. As not all characters which are valid in file paths are valid in Python function names we have a translation table. However, this translation table was missing an entry for '~'. (Bitbake rev: b201c0b284e25c20685d9d206797c4cc650eeca0) Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/parse/ast.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index db2bdc35ec..977ba375bf 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -146,7 +146,7 @@ class DataNode(AstNode):
146 data.setVar(key, val, parsing=True, **loginfo) 146 data.setVar(key, val, parsing=True, **loginfo)
147 147
148class MethodNode(AstNode): 148class MethodNode(AstNode):
149 tr_tbl = str.maketrans('/.+-@%&', '_______') 149 tr_tbl = str.maketrans('/.+-@%&~', '________')
150 150
151 def __init__(self, filename, lineno, func_name, body, python, fakeroot): 151 def __init__(self, filename, lineno, func_name, body, python, fakeroot):
152 AstNode.__init__(self, filename, lineno) 152 AstNode.__init__(self, filename, lineno)