aboutsummaryrefslogtreecommitdiffstats
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:03 +0000
commit60f43d0428d43c981b44b6c8d125f77440f6c8f9 (patch)
tree64310f839e2d36f5d13e920257d4d0423c089fc6
parentd2cb388f58a37db2149fad34e4572d954e6e5441 (diff)
downloadbitbake-contrib-60f43d0428d43c981b44b6c8d125f77440f6c8f9.tar.gz
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. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 53fe34825..4be26367d 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -70,10 +70,6 @@ def keys(d):
"""Return a list of keys in d"""
return d.keys()
-
-__expand_var_regexp__ = re.compile(r"\${[^{}]+}")
-__expand_python_regexp__ = re.compile(r"\${@.+?}")
-
def expand(s, d, varname = None):
"""Variable expansion using the data store"""
return d.expand(s, varname)