summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
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/lib/bb
parent9a8b6447c60908b9e603aa51da7328b52460f53a (diff)
downloadopenembedded-core-53ff069611e9b22d94ff1406cfa223564b7e54a6.tar.gz
openembedded-core-53ff069611e9b22d94ff1406cfa223564b7e54a6.tar.bz2
openembedded-core-53ff069611e9b22d94ff1406cfa223564b7e54a6.tar.xz
openembedded-core-53ff069611e9b22d94ff1406cfa223564b7e54a6.zip
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/lib/bb')
-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 ef5256f14..1b974312b 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -360,7 +360,7 @@ class RunQueueData:
if len(taskData.tasks_name) == 0:
# Nothing to do
- return
+ return 0
bb.msg.note(1, bb.msg.domain.RunQueue, "Preparing runqueue")
@@ -686,6 +686,8 @@ class RunQueueData:
#bb.note("Found setscene for %s %s" % (self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task]))
self.runq_setscene.append(task)
+ return len(self.runq_fnid)
+
def dump_data(self, taskQueue):
"""
Dump some debug information on the internal data structures
@@ -876,8 +878,11 @@ class RunQueue:
retval = 0.5
if self.state is runQueuePrepare:
- self.rqdata.prepare()
- self.state = runQueueSceneInit
+ self.rqexe = RunQueueExecuteDummy(self)
+ if self.rqdata.prepare() is 0:
+ self.state = runQueueComplete
+ else:
+ self.state = runQueueSceneInit
if self.state is runQueueSceneInit:
self.rqexe = RunQueueExecuteScenequeue(self)
@@ -1014,6 +1019,14 @@ class RunQueueExecute:
return proc
+class RunQueueExecuteDummy(RunQueueExecute):
+ def __init__(self, rq):
+ self.rq = rq
+ self.stats = RunQueueStats(0)
+ def finish(self):
+ self.rq.state = runQueueComplete
+ return
+
class RunQueueExecuteTasks(RunQueueExecute):
def __init__(self, rq):
RunQueueExecute.__init__(self, rq)