diff options
| author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-02-29 22:15:27 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-01 15:51:35 +0000 |
| commit | 13cad7147ffc4140fd2cc36b3a832540748c8d38 (patch) | |
| tree | 18c159b73c208c942788dd19b4a889a42be3a411 /bitbake | |
| parent | 7ee14c19940100143f930e5d19bf45e6af140f01 (diff) | |
| download | poky-13cad7147ffc4140fd2cc36b3a832540748c8d38.tar.gz | |
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>
Diffstat (limited to 'bitbake')
| -rwxr-xr-x | 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 1d012f937e..a905030aca 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
| @@ -188,7 +188,6 @@ class Builder(gtk.Window): | |||
| 188 | self.previous_step = None | 188 | self.previous_step = None |
| 189 | 189 | ||
| 190 | self.stopping = False | 190 | self.stopping = False |
| 191 | self.build_succeeded = True | ||
| 192 | 191 | ||
| 193 | # recipe model and package model | 192 | # recipe model and package model |
| 194 | self.recipe_model = recipe_model | 193 | self.recipe_model = recipe_model |
| @@ -520,8 +519,7 @@ class Builder(gtk.Window): | |||
| 520 | fraction = 0 | 519 | fraction = 0 |
| 521 | self.build_details_page.update_progress_bar("Build Started: ", fraction) | 520 | self.build_details_page.update_progress_bar("Build Started: ", fraction) |
| 522 | 521 | ||
| 523 | def handler_build_succeeded_cb(self, running_build): | 522 | def build_succeeded(self): |
| 524 | self.build_succeeded = True | ||
| 525 | if self.current_step == self.FAST_IMAGE_GENERATING: | 523 | if self.current_step == self.FAST_IMAGE_GENERATING: |
| 526 | fraction = 0.9 | 524 | fraction = 0.9 |
| 527 | elif self.current_step == self.IMAGE_GENERATING: | 525 | elif self.current_step == self.IMAGE_GENERATING: |
| @@ -535,9 +533,9 @@ class Builder(gtk.Window): | |||
| 535 | elif self.current_step == self.PACKAGE_GENERATING: | 533 | elif self.current_step == self.PACKAGE_GENERATING: |
| 536 | fraction = 1.0 | 534 | fraction = 1.0 |
| 537 | self.build_details_page.update_progress_bar("Build Completed: ", fraction) | 535 | self.build_details_page.update_progress_bar("Build Completed: ", fraction) |
| 536 | self.stopping = False | ||
| 538 | 537 | ||
| 539 | def handler_build_failed_cb(self, running_build): | 538 | def build_failed(self): |
| 540 | self.build_succeeded = False | ||
| 541 | if self.current_step == self.FAST_IMAGE_GENERATING: | 539 | if self.current_step == self.FAST_IMAGE_GENERATING: |
| 542 | fraction = 0.9 | 540 | fraction = 0.9 |
| 543 | elif self.current_step == self.IMAGE_GENERATING: | 541 | elif self.current_step == self.IMAGE_GENERATING: |
| @@ -550,6 +548,16 @@ class Builder(gtk.Window): | |||
| 550 | self.handler.build_failed_async() | 548 | self.handler.build_failed_async() |
| 551 | self.stopping = False | 549 | self.stopping = False |
| 552 | 550 | ||
| 551 | def handler_build_succeeded_cb(self, running_build): | ||
| 552 | if not self.stopping: | ||
| 553 | self.build_succeeded() | ||
| 554 | else: | ||
| 555 | self.build_failed() | ||
| 556 | |||
| 557 | |||
| 558 | def handler_build_failed_cb(self, running_build): | ||
| 559 | self.build_failed() | ||
| 560 | |||
| 553 | def handler_task_started_cb(self, running_build, message): | 561 | def handler_task_started_cb(self, running_build, message): |
| 554 | fraction = message["current"] * 1.0/message["total"] | 562 | fraction = message["current"] * 1.0/message["total"] |
| 555 | title = "Build packages" | 563 | title = "Build packages" |
