diff options
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
| -rw-r--r-- | bitbake/lib/bb/runqueue.py | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index f984119e87..428cff1c80 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
| @@ -1437,14 +1437,16 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
| 1437 | startevent = runQueueTaskStarted(task, self.stats, self.rq) | 1437 | startevent = runQueueTaskStarted(task, self.stats, self.rq) |
| 1438 | bb.event.fire(startevent, self.cfgData) | 1438 | bb.event.fire(startevent, self.cfgData) |
| 1439 | 1439 | ||
| 1440 | taskdepdata = self.build_taskdepdata(task) | ||
| 1441 | |||
| 1440 | taskdep = self.rqdata.dataCache.task_deps[fn] | 1442 | taskdep = self.rqdata.dataCache.task_deps[fn] |
| 1441 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: | 1443 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: |
| 1442 | if not self.rq.fakeworker: | 1444 | if not self.rq.fakeworker: |
| 1443 | self.rq.start_fakeworker(self) | 1445 | self.rq.start_fakeworker(self) |
| 1444 | self.rq.fakeworker.stdin.write("<runtask>" + pickle.dumps((fn, task, taskname, False, self.cooker.collection.get_file_appends(fn))) + "</runtask>") | 1446 | self.rq.fakeworker.stdin.write("<runtask>" + pickle.dumps((fn, task, taskname, False, self.cooker.collection.get_file_appends(fn), taskdepdata)) + "</runtask>") |
| 1445 | self.rq.fakeworker.stdin.flush() | 1447 | self.rq.fakeworker.stdin.flush() |
| 1446 | else: | 1448 | else: |
| 1447 | self.rq.worker.stdin.write("<runtask>" + pickle.dumps((fn, task, taskname, False, self.cooker.collection.get_file_appends(fn))) + "</runtask>") | 1449 | self.rq.worker.stdin.write("<runtask>" + pickle.dumps((fn, task, taskname, False, self.cooker.collection.get_file_appends(fn), taskdepdata)) + "</runtask>") |
| 1448 | self.rq.worker.stdin.flush() | 1450 | self.rq.worker.stdin.flush() |
| 1449 | 1451 | ||
| 1450 | self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) | 1452 | self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) |
| @@ -1474,6 +1476,26 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
| 1474 | 1476 | ||
| 1475 | return True | 1477 | return True |
| 1476 | 1478 | ||
| 1479 | def build_taskdepdata(self, task): | ||
| 1480 | taskdepdata = {} | ||
| 1481 | next = self.rqdata.runq_depends[task] | ||
| 1482 | next.add(task) | ||
| 1483 | while next: | ||
| 1484 | additional = [] | ||
| 1485 | for revdep in next: | ||
| 1486 | fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[revdep]] | ||
| 1487 | pn = self.rqdata.dataCache.pkg_fn[fn] | ||
| 1488 | taskname = self.rqdata.runq_task[revdep] | ||
| 1489 | deps = self.rqdata.runq_depends[revdep] | ||
| 1490 | taskdepdata[revdep] = [pn, taskname, fn, deps] | ||
| 1491 | for revdep2 in deps: | ||
| 1492 | if revdep2 not in taskdepdata: | ||
| 1493 | additional.append(revdep2) | ||
| 1494 | next = additional | ||
| 1495 | |||
| 1496 | #bb.note("Task %s: " % task + str(taskdepdata).replace("], ", "],\n")) | ||
| 1497 | return taskdepdata | ||
| 1498 | |||
| 1477 | class RunQueueExecuteScenequeue(RunQueueExecute): | 1499 | class RunQueueExecuteScenequeue(RunQueueExecute): |
| 1478 | def __init__(self, rq): | 1500 | def __init__(self, rq): |
| 1479 | RunQueueExecute.__init__(self, rq) | 1501 | RunQueueExecute.__init__(self, rq) |
| @@ -1784,10 +1806,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
| 1784 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']: | 1806 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']: |
| 1785 | if not self.rq.fakeworker: | 1807 | if not self.rq.fakeworker: |
| 1786 | self.rq.start_fakeworker(self) | 1808 | self.rq.start_fakeworker(self) |
| 1787 | self.rq.fakeworker.stdin.write("<runtask>" + pickle.dumps((fn, realtask, taskname, True, self.cooker.collection.get_file_appends(fn))) + "</runtask>") | 1809 | self.rq.fakeworker.stdin.write("<runtask>" + pickle.dumps((fn, realtask, taskname, True, self.cooker.collection.get_file_appends(fn), None)) + "</runtask>") |
| 1788 | self.rq.fakeworker.stdin.flush() | 1810 | self.rq.fakeworker.stdin.flush() |
| 1789 | else: | 1811 | else: |
| 1790 | self.rq.worker.stdin.write("<runtask>" + pickle.dumps((fn, realtask, taskname, True, self.cooker.collection.get_file_appends(fn))) + "</runtask>") | 1812 | self.rq.worker.stdin.write("<runtask>" + pickle.dumps((fn, realtask, taskname, True, self.cooker.collection.get_file_appends(fn), None)) + "</runtask>") |
| 1791 | self.rq.worker.stdin.flush() | 1813 | self.rq.worker.stdin.flush() |
| 1792 | 1814 | ||
| 1793 | self.runq_running[task] = 1 | 1815 | self.runq_running[task] = 1 |
