diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-25 00:58:23 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-25 00:59:13 +0100 |
commit | 53ff069611e9b22d94ff1406cfa223564b7e54a6 (patch) | |
tree | 9f2a9f20ffc169898a1ab85479dce7f0c01faeab /bitbake/lib | |
parent | 9a8b6447c60908b9e603aa51da7328b52460f53a (diff) | |
download | openembedded-core-53ff069611e9b22d94ff1406cfa223564b7e54a6.tar.gz openembedded-core-53ff069611e9b22d94ff1406cfa223564b7e54a6.tar.bz2 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')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 19 |
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: 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) |