[oe-commits] [bitbake] 02/05: data_smart: Improve islower() testing of overrides
git at git.openembedded.org
git at git.openembedded.org
Mon Jan 7 15:39:53 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit b8e71cf505956857c80fde886c44ba8fcd3f1897
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Jan 7 15:13:25 2019 +0000
data_smart: Improve islower() testing of overrides
The previous fix here caused confusion, improve the patch to make it clearer
what kinds of values we're accepting and why islower() alone isn't enough
due to numeric only components of overrides.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/data_smart.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 1f45cd9..2b25179 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -43,7 +43,6 @@ __setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remo
__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
__expand_python_regexp__ = re.compile(r"\${@.+?}")
__whitespace_split__ = re.compile(r'(\s)')
-__override_regexp__ = re.compile(r'[a-z0-9]+')
def infer_caller_details(loginfo, parent = False, varval = True):
"""Save the caller the trouble of specifying everything."""
@@ -598,7 +597,8 @@ class DataSmart(MutableMapping):
# aka pay the cookie monster
override = var[var.rfind('_')+1:]
shortvar = var[:var.rfind('_')]
- while override and __override_regexp__.match(override):
+ # overrides like "x86_64" are accepted but "64".islower() would return false
+ while override and (override.islower() or override.isnumeric()):
if shortvar not in self.overridedata:
self.overridedata[shortvar] = []
if [var, override] not in self.overridedata[shortvar]:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list