mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
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>
This commit is contained in:
@@ -244,12 +244,14 @@ class AddTaskNode(AstNode):
|
||||
bb.build.addtask(self.func, self.before, self.after, data)
|
||||
|
||||
class DelTaskNode(AstNode):
|
||||
def __init__(self, filename, lineno, func):
|
||||
def __init__(self, filename, lineno, tasks):
|
||||
AstNode.__init__(self, filename, lineno)
|
||||
self.func = func
|
||||
self.tasks = tasks
|
||||
|
||||
def eval(self, data):
|
||||
bb.build.deltask(self.func, data)
|
||||
tasks = data.expand(self.tasks).split()
|
||||
for task in tasks:
|
||||
bb.build.deltask(task, data)
|
||||
|
||||
class BBHandlerNode(AstNode):
|
||||
def __init__(self, filename, lineno, fns):
|
||||
@@ -305,7 +307,7 @@ def handleAddTask(statements, filename, lineno, m):
|
||||
statements.append(AddTaskNode(filename, lineno, func, before, after))
|
||||
|
||||
def handleDelTask(statements, filename, lineno, m):
|
||||
func = m.group("func")
|
||||
func = m.group(1)
|
||||
if func is None:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user