diff options
author | Kang Kai <kai.kang@windriver.com> | 2012-07-27 16:38:03 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-02 15:28:40 +0100 |
commit | 6a293985b2db589c9fae777be00d3c20ed1ec49f (patch) | |
tree | 02db69142527f62ff66ee960b719f4191b67fd86 /bitbake/lib/bb/ui/crumbs/runningbuild.py | |
parent | b2a959a0ce039b7630c0ea537d772df647c75663 (diff) | |
download | poky-6a293985b2db589c9fae777be00d3c20ed1ec49f.tar.gz |
bitbake: hob: deal event DiskFull
Part of [Yocto #2168]
When bitbake runqueue is teminated by disk monitor, it will send event
DiskFull. Update to handle it.
(Bitbake rev: a691de10d8b8de552628b277e78d47c607ee3a46)
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/runningbuild.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/runningbuild.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index 8cf36ee24e..0347058d7e 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py | |||
@@ -76,6 +76,9 @@ class RunningBuild (gobject.GObject): | |||
76 | 'build-complete' : (gobject.SIGNAL_RUN_LAST, | 76 | 'build-complete' : (gobject.SIGNAL_RUN_LAST, |
77 | gobject.TYPE_NONE, | 77 | gobject.TYPE_NONE, |
78 | ()), | 78 | ()), |
79 | 'build-aborted' : (gobject.SIGNAL_RUN_LAST, | ||
80 | gobject.TYPE_NONE, | ||
81 | ()), | ||
79 | 'task-started' : (gobject.SIGNAL_RUN_LAST, | 82 | 'task-started' : (gobject.SIGNAL_RUN_LAST, |
80 | gobject.TYPE_NONE, | 83 | gobject.TYPE_NONE, |
81 | (gobject.TYPE_PYOBJECT,)), | 84 | (gobject.TYPE_PYOBJECT,)), |
@@ -93,6 +96,7 @@ class RunningBuild (gobject.GObject): | |||
93 | gobject.GObject.__init__ (self) | 96 | gobject.GObject.__init__ (self) |
94 | self.model = RunningBuildModel() | 97 | self.model = RunningBuildModel() |
95 | self.sequential = sequential | 98 | self.sequential = sequential |
99 | self.buildaborted = False | ||
96 | 100 | ||
97 | def reset (self): | 101 | def reset (self): |
98 | self.pids_to_task.clear() | 102 | self.pids_to_task.clear() |
@@ -274,7 +278,9 @@ class RunningBuild (gobject.GObject): | |||
274 | 0)) | 278 | 0)) |
275 | 279 | ||
276 | # Emit the appropriate signal depending on the number of failures | 280 | # Emit the appropriate signal depending on the number of failures |
277 | if (failures >= 1): | 281 | if self.buildaborted: |
282 | self.emit ("build-aborted") | ||
283 | elif (failures >= 1): | ||
278 | self.emit ("build-failed") | 284 | self.emit ("build-failed") |
279 | else: | 285 | else: |
280 | self.emit ("build-succeeded") | 286 | self.emit ("build-succeeded") |
@@ -286,6 +292,9 @@ class RunningBuild (gobject.GObject): | |||
286 | if pbar: | 292 | if pbar: |
287 | pbar.set_text(event.msg) | 293 | pbar.set_text(event.msg) |
288 | 294 | ||
295 | elif isinstance(event, bb.event.DiskFull): | ||
296 | self.buildaborted = True | ||
297 | |||
289 | elif isinstance(event, bb.command.CommandFailed): | 298 | elif isinstance(event, bb.command.CommandFailed): |
290 | if event.error.startswith("Exited with"): | 299 | if event.error.startswith("Exited with"): |
291 | # If the command fails with an exit code we're done, emit the | 300 | # If the command fails with an exit code we're done, emit the |