@@ -776,3 +776,9 @@ class CommandsAsync:
bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.databuilder.mcdata[mc])
command.finishAsyncCommand()
findSigInfo.needcache = False
+
+ def getTaskSignatures(self, command, params):
+ res = command.cooker.getTaskSignatures(params[0], params[1])
+ bb.event.fire(bb.event.GetTaskSignatureResult(res), command.cooker.data)
+ command.finishAsyncCommand()
+ getTaskSignatures.needcache = True
@@ -1542,6 +1542,22 @@ class BBCooker:
self.idleCallBackRegister(buildFileIdle, rq)
+ def getTaskSignatures(self, target, task):
+ sig = []
+
+ taskdata, runlist = self.buildTaskData(target, "do_build", self.configuration.halt)
+ rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
+ rq.rqdata.prepare()
+
+ for key in rq.rqdata.runtaskentries:
+ pn = bb.parse.siggen.tidtopn[key]
+ taskname = bb.runqueue.taskname_from_tid(key)
+ if pn in target:
+ if (task and taskname in task) or (not task):
+ rq.rqdata.prepare_task_hash(key)
+ sig.append([pn, taskname, rq.rqdata.get_task_unihash(key)])
+ return sig
+
def buildTargets(self, targets, task):
"""
Attempt to build the targets specified
@@ -857,6 +857,14 @@ class FindSigInfoResult(Event):
Event.__init__(self)
self.result = result
+class GetTaskSignatureResult(Event):
+ """
+ Event to return results from GetTaskSignatures command
+ """
+ def __init__(self, sig):
+ Event.__init__(self)
+ self.sig = sig
+
class ParseError(Event):
"""
Event to indicate parse failed
adding a new command in cooker to compute and get task signatures this commit also add the associated command and event needed to get the signatures using tinfoil Signed-off-by: Julien Stephan <jstephan@baylibre.com> --- bitbake/lib/bb/command.py | 6 ++++++ bitbake/lib/bb/cooker.py | 16 ++++++++++++++++ bitbake/lib/bb/event.py | 8 ++++++++ 3 files changed, 30 insertions(+)