mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
Hob: Fix pressing "stop" build
This commit fixes the behavior of clicking stop build button, it will stay in the build detail screen and show build is failed. (Bitbake rev: 80291865fa15012a3734e8724eb73c62b4ddc62f) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7ee14c1994
commit
13cad7147f
@@ -188,7 +188,6 @@ class Builder(gtk.Window):
|
||||
self.previous_step = None
|
||||
|
||||
self.stopping = False
|
||||
self.build_succeeded = True
|
||||
|
||||
# recipe model and package model
|
||||
self.recipe_model = recipe_model
|
||||
@@ -520,8 +519,7 @@ class Builder(gtk.Window):
|
||||
fraction = 0
|
||||
self.build_details_page.update_progress_bar("Build Started: ", fraction)
|
||||
|
||||
def handler_build_succeeded_cb(self, running_build):
|
||||
self.build_succeeded = True
|
||||
def build_succeeded(self):
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
fraction = 0.9
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
@@ -535,9 +533,9 @@ class Builder(gtk.Window):
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
|
||||
self.stopping = False
|
||||
|
||||
def handler_build_failed_cb(self, running_build):
|
||||
self.build_succeeded = False
|
||||
def build_failed(self):
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
fraction = 0.9
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
@@ -550,6 +548,16 @@ class Builder(gtk.Window):
|
||||
self.handler.build_failed_async()
|
||||
self.stopping = False
|
||||
|
||||
def handler_build_succeeded_cb(self, running_build):
|
||||
if not self.stopping:
|
||||
self.build_succeeded()
|
||||
else:
|
||||
self.build_failed()
|
||||
|
||||
|
||||
def handler_build_failed_cb(self, running_build):
|
||||
self.build_failed()
|
||||
|
||||
def handler_task_started_cb(self, running_build, message):
|
||||
fraction = message["current"] * 1.0/message["total"]
|
||||
title = "Build packages"
|
||||
|
||||
Reference in New Issue
Block a user