Message ID | 20221107164520.432783-1-mark.asselstine@windriver.com |
---|---|
State | Accepted, archived |
Commit | 60f43d0428d43c981b44b6c8d125f77440f6c8f9 |
Headers | show |
Series | data: drop unused __expand_var_regexp__ and __expand_python_regexp__ | expand |
diff --git a/lib/bb/data.py b/lib/bb/data.py index 53fe3482..4be26367 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)
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> --- lib/bb/data.py | 4 ---- 1 file changed, 4 deletions(-)