summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorJulien Stephan <jstephan@baylibre.com>2023-09-25 10:04:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-28 12:38:26 +0100
commit8eeb58cf4a34546ca0c5dd6518ece317d8706c40 (patch)
tree42d7fff81a4156291cdc39a59909ace17140fca4 /bitbake/lib/bb/cooker.py
parentfc5a15cc646b994edd26cd9d5040c8bad6634dc3 (diff)
downloadpoky-8eeb58cf4a34546ca0c5dd6518ece317d8706c40.tar.gz
bitbake: bitbake: cooker: add a new function to retrieve task signatures
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 (Bitbake rev: 05c15162de90c41dad67e37a95ec9fdb440a7864) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 87aa71bb65..599c7ddaa2 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1442,6 +1442,37 @@ class BBCooker:
1442 1442
1443 self.idleCallBackRegister(buildFileIdle, rq) 1443 self.idleCallBackRegister(buildFileIdle, rq)
1444 1444
1445 def getTaskSignatures(self, target, tasks):
1446 sig = []
1447 getAllTaskSignatures = False
1448
1449 if not tasks:
1450 tasks = ["do_build"]
1451 getAllTaskSignatures = True
1452
1453 for task in tasks:
1454 taskdata, runlist = self.buildTaskData(target, task, self.configuration.halt)
1455 rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
1456 rq.rqdata.prepare()
1457
1458 for l in runlist:
1459 mc, pn, taskname, fn = l
1460
1461 taskdep = rq.rqdata.dataCaches[mc].task_deps[fn]
1462 for t in taskdep['tasks']:
1463 if t in taskdep['nostamp'] or "setscene" in t:
1464 continue
1465 tid = bb.runqueue.build_tid(mc, fn, t)
1466
1467 if t in task or getAllTaskSignatures:
1468 try:
1469 rq.rqdata.prepare_task_hash(tid)
1470 sig.append([pn, t, rq.rqdata.get_task_unihash(tid)])
1471 except KeyError:
1472 sig.append(self.getTaskSignatures(target, [t])[0])
1473
1474 return sig
1475
1445 def buildTargets(self, targets, task): 1476 def buildTargets(self, targets, task):
1446 """ 1477 """
1447 Attempt to build the targets specified 1478 Attempt to build the targets specified