summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-07-27 16:38:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-02 15:28:40 +0100
commit6a293985b2db589c9fae777be00d3c20ed1ec49f (patch)
tree02db69142527f62ff66ee960b719f4191b67fd86 /bitbake
parentb2a959a0ce039b7630c0ea537d772df647c75663 (diff)
downloadpoky-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')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py4
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py11
2 files changed, 14 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 123608eb25..c2e7068428 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -430,6 +430,7 @@ class Builder(gtk.Window):
430 self.handler.build.connect("build-started", self.handler_build_started_cb) 430 self.handler.build.connect("build-started", self.handler_build_started_cb)
431 self.handler.build.connect("build-succeeded", self.handler_build_succeeded_cb) 431 self.handler.build.connect("build-succeeded", self.handler_build_succeeded_cb)
432 self.handler.build.connect("build-failed", self.handler_build_failed_cb) 432 self.handler.build.connect("build-failed", self.handler_build_failed_cb)
433 self.handler.build.connect("build-aborted", self.handler_build_aborted_cb)
433 self.handler.build.connect("task-started", self.handler_task_started_cb) 434 self.handler.build.connect("task-started", self.handler_task_started_cb)
434 self.handler.build.connect("log-error", self.handler_build_failure_cb) 435 self.handler.build.connect("log-error", self.handler_build_failure_cb)
435 self.handler.build.connect("no-provider", self.handler_no_provider_cb) 436 self.handler.build.connect("no-provider", self.handler_no_provider_cb)
@@ -920,6 +921,9 @@ class Builder(gtk.Window):
920 def handler_build_failed_cb(self, running_build): 921 def handler_build_failed_cb(self, running_build):
921 self.build_failed() 922 self.build_failed()
922 923
924 def handler_build_aborted_cb(self, running_build):
925 self.build_failed()
926
923 def handler_no_provider_cb(self, running_build, msg): 927 def handler_no_provider_cb(self, running_build, msg):
924 dialog = CrumbsMessageDialog(self, Builder.interpret_markup(msg), gtk.STOCK_DIALOG_INFO) 928 dialog = CrumbsMessageDialog(self, Builder.interpret_markup(msg), gtk.STOCK_DIALOG_INFO)
925 button = dialog.add_button("Close", gtk.RESPONSE_OK) 929 button = dialog.add_button("Close", gtk.RESPONSE_OK)
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