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>
This commit is contained in:
parent
b2a959a0ce
commit
6a293985b2
|
@ -430,6 +430,7 @@ class Builder(gtk.Window):
|
|||
self.handler.build.connect("build-started", self.handler_build_started_cb)
|
||||
self.handler.build.connect("build-succeeded", self.handler_build_succeeded_cb)
|
||||
self.handler.build.connect("build-failed", self.handler_build_failed_cb)
|
||||
self.handler.build.connect("build-aborted", self.handler_build_aborted_cb)
|
||||
self.handler.build.connect("task-started", self.handler_task_started_cb)
|
||||
self.handler.build.connect("log-error", self.handler_build_failure_cb)
|
||||
self.handler.build.connect("no-provider", self.handler_no_provider_cb)
|
||||
|
@ -920,6 +921,9 @@ class Builder(gtk.Window):
|
|||
def handler_build_failed_cb(self, running_build):
|
||||
self.build_failed()
|
||||
|
||||
def handler_build_aborted_cb(self, running_build):
|
||||
self.build_failed()
|
||||
|
||||
def handler_no_provider_cb(self, running_build, msg):
|
||||
dialog = CrumbsMessageDialog(self, Builder.interpret_markup(msg), gtk.STOCK_DIALOG_INFO)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
|
|
|
@ -76,6 +76,9 @@ class RunningBuild (gobject.GObject):
|
|||
'build-complete' : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
'build-aborted' : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
'task-started' : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
|
@ -93,6 +96,7 @@ class RunningBuild (gobject.GObject):
|
|||
gobject.GObject.__init__ (self)
|
||||
self.model = RunningBuildModel()
|
||||
self.sequential = sequential
|
||||
self.buildaborted = False
|
||||
|
||||
def reset (self):
|
||||
self.pids_to_task.clear()
|
||||
|
@ -274,7 +278,9 @@ class RunningBuild (gobject.GObject):
|
|||
0))
|
||||
|
||||
# Emit the appropriate signal depending on the number of failures
|
||||
if (failures >= 1):
|
||||
if self.buildaborted:
|
||||
self.emit ("build-aborted")
|
||||
elif (failures >= 1):
|
||||
self.emit ("build-failed")
|
||||
else:
|
||||
self.emit ("build-succeeded")
|
||||
|
@ -286,6 +292,9 @@ class RunningBuild (gobject.GObject):
|
|||
if pbar:
|
||||
pbar.set_text(event.msg)
|
||||
|
||||
elif isinstance(event, bb.event.DiskFull):
|
||||
self.buildaborted = True
|
||||
|
||||
elif isinstance(event, bb.command.CommandFailed):
|
||||
if event.error.startswith("Exited with"):
|
||||
# If the command fails with an exit code we're done, emit the
|
||||
|
|
Loading…
Reference in New Issue