From ac9ea453b34fe8f438af07c28441dba9d4e77531 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Mon, 7 Nov 2022 11:45:20 -0500 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/data.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'bitbake') 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): """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) -- cgit v1.2.3-54-g00ecf