[bitbake-devel] [PATCH 30/32] Hob: Fix pressing "stop" build
Joshua Lock
josh at linux.intel.com
Wed Feb 29 21:29:32 UTC 2012
On 29/02/12 06:15, Shane Wang wrote:
> From: Dongxiao Xu<dongxiao.xu at intel.com>
>
> This commit fixes the behavior of clicking stop build button, it will
> stay in the build detail screen and show build is failed.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu at intel.com>
Signed-off-by: Joshua Lock <josh at linux.intel.com>
> ---
> bitbake/lib/bb/ui/crumbs/builder.py | 18 +++++++++++++-----
> 1 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
> index f41b6a4..a04d6fa 100755
> --- a/bitbake/lib/bb/ui/crumbs/builder.py
> +++ b/bitbake/lib/bb/ui/crumbs/builder.py
> @@ -193,7 +193,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
> @@ -533,8 +532,7 @@ class Builder(gtk.Window):
> self.build_details_page.update_progress_bar("Build Started: ", fraction)
> self.build_details_page.reset_issues()
>
> - 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:
> @@ -548,9 +546,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:
> @@ -563,6 +561,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"
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
More information about the bitbake-devel
mailing list