diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-01 11:09:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-21 16:57:43 +0100 |
commit | acce65abb98529be15748892480d4c24396556f2 (patch) | |
tree | 2536b5509c6004dc6fce2bc9c100af23598738ca /bitbake/lib/bb/parse/parse_py | |
parent | 0aff94023f931a84d21069d92522e0f5338f09a4 (diff) | |
download | poky-acce65abb98529be15748892480d4c24396556f2.tar.gz |
bitbake: build: Allow deltask to take multiple tasknames
deltask currently supports only one task to delete but it would be useful
if it could support a variable which gets expanded to allow flexibility
in the metadata.
This is simple to support in bitbake and is how other directives such
as inherit operate so adjust the parser/code to handle that. It means
that syntax like:
EXTRA_NOPACKAGE_DELTASKS = ""
deltask ${EXTRA_NOPACKAGE_DELTASKS}
is now allowed.
(Bitbake rev: 883d926120833c85a16dcf60425dd7af7699046a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 6e216effb8..215f940b60 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -26,7 +26,7 @@ __func_start_regexp__ = re.compile(r"(((?P<py>python)|(?P<fr>fakeroot))\s*)*( | |||
26 | __inherit_regexp__ = re.compile(r"inherit\s+(.+)" ) | 26 | __inherit_regexp__ = re.compile(r"inherit\s+(.+)" ) |
27 | __export_func_regexp__ = re.compile(r"EXPORT_FUNCTIONS\s+(.+)" ) | 27 | __export_func_regexp__ = re.compile(r"EXPORT_FUNCTIONS\s+(.+)" ) |
28 | __addtask_regexp__ = re.compile(r"addtask\s+(?P<func>\w+)\s*((before\s*(?P<before>((.*(?=after))|(.*))))|(after\s*(?P<after>((.*(?=before))|(.*)))))*") | 28 | __addtask_regexp__ = re.compile(r"addtask\s+(?P<func>\w+)\s*((before\s*(?P<before>((.*(?=after))|(.*))))|(after\s*(?P<after>((.*(?=before))|(.*)))))*") |
29 | __deltask_regexp__ = re.compile(r"deltask\s+(?P<func>\w+)(?P<ignores>.*)") | 29 | __deltask_regexp__ = re.compile(r"deltask\s+(.+)") |
30 | __addhandler_regexp__ = re.compile(r"addhandler\s+(.+)" ) | 30 | __addhandler_regexp__ = re.compile(r"addhandler\s+(.+)" ) |
31 | __def_regexp__ = re.compile(r"def\s+(\w+).*:" ) | 31 | __def_regexp__ = re.compile(r"def\s+(\w+).*:" ) |
32 | __python_func_regexp__ = re.compile(r"(\s+.*)|(^$)|(^#)" ) | 32 | __python_func_regexp__ = re.compile(r"(\s+.*)|(^$)|(^#)" ) |
@@ -238,9 +238,6 @@ def feeder(lineno, s, fn, root, statements, eof=False): | |||
238 | 238 | ||
239 | m = __deltask_regexp__.match(s) | 239 | m = __deltask_regexp__.match(s) |
240 | if m: | 240 | if m: |
241 | # Check and warn "for deltask task1 task2" | ||
242 | if m.group('ignores'): | ||
243 | logger.warning('deltask ignored: "%s"' % m.group('ignores')) | ||
244 | ast.handleDelTask(statements, fn, lineno, m) | 241 | ast.handleDelTask(statements, fn, lineno, m) |
245 | return | 242 | return |
246 | 243 | ||