summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-25 00:58:23 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-25 00:59:13 +0100
commit53ff069611e9b22d94ff1406cfa223564b7e54a6 (patch)
tree9f2a9f20ffc169898a1ab85479dce7f0c01faeab /bitbake
parent9a8b6447c60908b9e603aa51da7328b52460f53a (diff)
downloadpoky-53ff069611e9b22d94ff1406cfa223564b7e54a6.tar.gz
bitbake/runqueue.py: Ensure rqexe always exists and that empty task lists cause a graceful exit
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index ef5256f14c..1b974312b2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -360,7 +360,7 @@ class RunQueueData:
360 360
361 if len(taskData.tasks_name) == 0: 361 if len(taskData.tasks_name) == 0:
362 # Nothing to do 362 # Nothing to do
363 return 363 return 0
364 364
365 bb.msg.note(1, bb.msg.domain.RunQueue, "Preparing runqueue") 365 bb.msg.note(1, bb.msg.domain.RunQueue, "Preparing runqueue")
366 366
@@ -686,6 +686,8 @@ class RunQueueData:
686 #bb.note("Found setscene for %s %s" % (self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task])) 686 #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) 687 self.runq_setscene.append(task)
688 688
689 return len(self.runq_fnid)
690
689 def dump_data(self, taskQueue): 691 def dump_data(self, taskQueue):
690 """ 692 """
691 Dump some debug information on the internal data structures 693 Dump some debug information on the internal data structures
@@ -876,8 +878,11 @@ class RunQueue:
876 retval = 0.5 878 retval = 0.5
877 879
878 if self.state is runQueuePrepare: 880 if self.state is runQueuePrepare:
879 self.rqdata.prepare() 881 self.rqexe = RunQueueExecuteDummy(self)
880 self.state = runQueueSceneInit 882 if self.rqdata.prepare() is 0:
883 self.state = runQueueComplete
884 else:
885 self.state = runQueueSceneInit
881 886
882 if self.state is runQueueSceneInit: 887 if self.state is runQueueSceneInit:
883 self.rqexe = RunQueueExecuteScenequeue(self) 888 self.rqexe = RunQueueExecuteScenequeue(self)
@@ -1014,6 +1019,14 @@ class RunQueueExecute:
1014 1019
1015 return proc 1020 return proc
1016 1021
1022class RunQueueExecuteDummy(RunQueueExecute):
1023 def __init__(self, rq):
1024 self.rq = rq
1025 self.stats = RunQueueStats(0)
1026 def finish(self):
1027 self.rq.state = runQueueComplete
1028 return
1029
1017class RunQueueExecuteTasks(RunQueueExecute): 1030class RunQueueExecuteTasks(RunQueueExecute):
1018 def __init__(self, rq): 1031 def __init__(self, rq):
1019 RunQueueExecute.__init__(self, rq) 1032 RunQueueExecute.__init__(self, rq)