diff options
| -rw-r--r-- | bitbake/lib/bb/command.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 31 | ||||
| -rw-r--r-- | bitbake/lib/bb/event.py | 8 |
3 files changed, 45 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 8663eed933..f2ee587161 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
| @@ -781,3 +781,9 @@ class CommandsAsync: | |||
| 781 | bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.databuilder.mcdata[mc]) | 781 | bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.databuilder.mcdata[mc]) |
| 782 | command.finishAsyncCommand() | 782 | command.finishAsyncCommand() |
| 783 | findSigInfo.needcache = False | 783 | findSigInfo.needcache = False |
| 784 | |||
| 785 | def getTaskSignatures(self, command, params): | ||
| 786 | res = command.cooker.getTaskSignatures(params[0], params[1]) | ||
| 787 | bb.event.fire(bb.event.GetTaskSignatureResult(res), command.cooker.data) | ||
| 788 | command.finishAsyncCommand() | ||
| 789 | getTaskSignatures.needcache = True | ||
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 |
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 0d0e0a68aa..f8acacd80d 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
| @@ -857,6 +857,14 @@ class FindSigInfoResult(Event): | |||
| 857 | Event.__init__(self) | 857 | Event.__init__(self) |
| 858 | self.result = result | 858 | self.result = result |
| 859 | 859 | ||
| 860 | class GetTaskSignatureResult(Event): | ||
| 861 | """ | ||
| 862 | Event to return results from GetTaskSignatures command | ||
| 863 | """ | ||
| 864 | def __init__(self, sig): | ||
| 865 | Event.__init__(self) | ||
| 866 | self.sig = sig | ||
| 867 | |||
| 860 | class ParseError(Event): | 868 | class ParseError(Event): |
| 861 | """ | 869 | """ |
| 862 | Event to indicate parse failed | 870 | Event to indicate parse failed |
