summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2022-11-07 11:45:20 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-10 14:43:06 +0000
commitac9ea453b34fe8f438af07c28441dba9d4e77531 (patch)
treef663f8a2ee485ecd9026f7c0cb7c2506695acf5b
parent7763bd0d2f2c668208dc196d0060eff7fc046959 (diff)
downloadpoky-ac9ea453b34fe8f438af07c28441dba9d4e77531.tar.gz
bitbake: data: drop unused __expand_var_regexp__ and __expand_python_regexp__
First, commit 81efd77987f6decf256967fa16521a40c14d3518 created a copy of __expand_var_regexp__ and __expand_python_regexp__ when creating the initial version of data_smart.py. A while later commit db1c998b31da06d7f3eb09fc6f59a1915b7b549e dropped all references to these variables from data.py. This leaves us today with two versions of these variables in the global scope. However, only those defined in data_smart.py are being used, in data_smart.py. Unfortunately there was no indication in the commit log for commit db1c998b31da indicating why the variables were left in place despite the functions referencing them were being removed. Additionally data.py imports data_smart, thus the versions of __expand_var_regexp__ and __expand_python_regexp__ defined in data_smart.py would be used by all bitbake code, beyond, potentially, some code in data.py which we know has no references to these variables. To remove any potential confusion around these variables drop the old definitions from data.py. (Bitbake rev: 60f43d0428d43c981b44b6c8d125f77440f6c8f9) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/data.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 53fe34825d..4be26367d2 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -70,10 +70,6 @@ def keys(d):
70 """Return a list of keys in d""" 70 """Return a list of keys in d"""
71 return d.keys() 71 return d.keys()
72 72
73
74__expand_var_regexp__ = re.compile(r"\${[^{}]+}")
75__expand_python_regexp__ = re.compile(r"\${@.+?}")
76
77def expand(s, d, varname = None): 73def expand(s, d, varname = None):
78 """Variable expansion using the data store""" 74 """Variable expansion using the data store"""
79 return d.expand(s, varname) 75 return d.expand(s, varname)