summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py38
1 files changed, 37 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 1b974312b2..3d84bb17ee 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -178,6 +178,7 @@ class RunQueueData:
178 self.runq_task = [] 178 self.runq_task = []
179 self.runq_depends = [] 179 self.runq_depends = []
180 self.runq_revdeps = [] 180 self.runq_revdeps = []
181 self.runq_hash = []
181 182
182 def runq_depends_names(self, ids): 183 def runq_depends_names(self, ids):
183 import re 184 import re
@@ -477,6 +478,7 @@ class RunQueueData:
477 self.runq_task.append(taskData.tasks_name[task]) 478 self.runq_task.append(taskData.tasks_name[task])
478 self.runq_depends.append(set(depends)) 479 self.runq_depends.append(set(depends))
479 self.runq_revdeps.append(set()) 480 self.runq_revdeps.append(set())
481 self.runq_hash.append("")
480 482
481 runq_build.append(0) 483 runq_build.append(0)
482 runq_recrdepends.append(recrdepends) 484 runq_recrdepends.append(recrdepends)
@@ -589,6 +591,7 @@ class RunQueueData:
589 del self.runq_depends[listid-delcount] 591 del self.runq_depends[listid-delcount]
590 del runq_build[listid-delcount] 592 del runq_build[listid-delcount]
591 del self.runq_revdeps[listid-delcount] 593 del self.runq_revdeps[listid-delcount]
594 del self.runq_hash[listid-delcount]
592 delcount = delcount + 1 595 delcount = delcount + 1
593 maps.append(-1) 596 maps.append(-1)
594 597
@@ -686,6 +689,20 @@ class RunQueueData:
686 #bb.note("Found setscene for %s %s" % (self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task])) 689 #bb.note("Found setscene for %s %s" % (self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task]))
687 self.runq_setscene.append(task) 690 self.runq_setscene.append(task)
688 691
692 # Interate over the task list and call into the siggen code
693
694 dealtwith = set()
695 todeal = set(range(len(self.runq_fnid)))
696 while len(todeal) > 0:
697 for task in todeal.copy():
698 if len(self.runq_depends[task] - dealtwith) == 0:
699 dealtwith.add(task)
700 todeal.remove(task)
701 procdep = []
702 for dep in self.runq_depends[task]:
703 procdep.append(self.taskData.fn_index[self.runq_fnid[dep]] + "." + self.runq_task[dep])
704 self.runq_hash[task] = bb.parse.siggen.get_taskhash(self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task], procdep, self.dataCache)
705
689 return len(self.runq_fnid) 706 return len(self.runq_fnid)
690 707
691 def dump_data(self, taskQueue): 708 def dump_data(self, taskQueue):
@@ -885,7 +902,10 @@ class RunQueue:
885 self.state = runQueueSceneInit 902 self.state = runQueueSceneInit
886 903
887 if self.state is runQueueSceneInit: 904 if self.state is runQueueSceneInit:
888 self.rqexe = RunQueueExecuteScenequeue(self) 905 if self.cooker.configuration.dump_signatures:
906 self.dump_signatures()
907 else:
908 self.rqexe = RunQueueExecuteScenequeue(self)
889 909
890 if self.state is runQueueSceneRun: 910 if self.state is runQueueSceneRun:
891 self.rqexe.execute() 911 self.rqexe.execute()
@@ -926,6 +946,20 @@ class RunQueue:
926 else: 946 else:
927 self.rqexe.finish() 947 self.rqexe.finish()
928 948
949 def dump_signatures(self):
950 self.state = runQueueComplete
951 done = set()
952 bb.note("Reparsing files to collect dependency data")
953 for task in range(len(self.rqdata.runq_fnid)):
954 if self.rqdata.runq_fnid[task] not in done:
955 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
956 the_data = self.cooker.bb_cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data)
957 done.add(self.rqdata.runq_fnid[task])
958
959 bb.parse.siggen.dump_sigs(self.rqdata.dataCache)
960
961 return
962
929 963
930class RunQueueExecute: 964class RunQueueExecute:
931 965
@@ -1007,6 +1041,8 @@ class RunQueueExecute:
1007 comps = var.split("=") 1041 comps = var.split("=")
1008 env[comps[0]] = comps[1] 1042 env[comps[0]] = comps[1]
1009 1043
1044 env['BB_TASKHASH'] = self.rqdata.runq_hash[task]
1045
1010 sys.stdout.flush() 1046 sys.stdout.flush()
1011 sys.stderr.flush() 1047 sys.stderr.flush()
1012 1048