diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 11:52:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-30 14:38:36 +0100 |
commit | 9c2186108e2e8fcf5837c0ffe9dbdeeaea4b7398 (patch) | |
tree | 29b4c091763c8f443d9a7a2b97a5bb4290910091 /bitbake | |
parent | 1f7b04355c032cd0de4cbe9352745920964c8057 (diff) | |
download | poky-9c2186108e2e8fcf5837c0ffe9dbdeeaea4b7398.tar.gz |
bitbake: data_smart: Allow colon in variable expansion regex
Now that ":" is a valid character in variable key names, it needs to be
allowed by the variable expansion code too, to match.
(Bitbake rev: c5418eae56cc50dbae7951c055434a0c456c53a4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/codeparser.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index ed6902dc8c..61b37cf334 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -28,7 +28,7 @@ logger = logging.getLogger("BitBake.Data") | |||
28 | 28 | ||
29 | __setvar_keyword__ = ["_append", "_prepend", "_remove"] | 29 | __setvar_keyword__ = ["_append", "_prepend", "_remove"] |
30 | __setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$') | 30 | __setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$') |
31 | __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~]+?}") | 31 | __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+?}") |
32 | __expand_python_regexp__ = re.compile(r"\${@.+?}") | 32 | __expand_python_regexp__ = re.compile(r"\${@.+?}") |
33 | __whitespace_split__ = re.compile(r'(\s)') | 33 | __whitespace_split__ = re.compile(r'(\s)') |
34 | __override_regexp__ = re.compile(r'[a-z0-9]+') | 34 | __override_regexp__ = re.compile(r'[a-z0-9]+') |
diff --git a/bitbake/lib/bb/tests/codeparser.py b/bitbake/lib/bb/tests/codeparser.py index 826a2d2f6d..f485204791 100644 --- a/bitbake/lib/bb/tests/codeparser.py +++ b/bitbake/lib/bb/tests/codeparser.py | |||
@@ -111,9 +111,9 @@ ${D}${libdir}/pkgconfig/*.pc | |||
111 | self.assertExecs(set(["sed"])) | 111 | self.assertExecs(set(["sed"])) |
112 | 112 | ||
113 | def test_parameter_expansion_modifiers(self): | 113 | def test_parameter_expansion_modifiers(self): |
114 | # - and + are also valid modifiers for parameter expansion, but are | 114 | # -,+ and : are also valid modifiers for parameter expansion, but are |
115 | # valid characters in bitbake variable names, so are not included here | 115 | # valid characters in bitbake variable names, so are not included here |
116 | for i in ('=', ':-', ':=', '?', ':?', ':+', '#', '%', '##', '%%'): | 116 | for i in ('=', '?', '#', '%', '##', '%%'): |
117 | name = "foo%sbar" % i | 117 | name = "foo%sbar" % i |
118 | self.parseExpression("${%s}" % name) | 118 | self.parseExpression("${%s}" % name) |
119 | self.assertNotIn(name, self.references) | 119 | self.assertNotIn(name, self.references) |