From 74211e0372da92bd6b8600bee9e5624f044127a6 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Sun, 15 Apr 2012 15:26:37 +0800 Subject: Hob: Handle NoProvider event in runningbuild module If NoProvider event is received, we will handle it in runningbuild module and send notification to Hob instance, avoiding stepping into the final page with no image built out. This fixes [YOCTO #2249] (Bitbake rev: 067bc46a0fbc542fef1fcaa406ad3737a4c5a55a) Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/bb/ui/crumbs/builder.py') diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 48053b35c5..dd59d59d10 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -349,6 +349,7 @@ class Builder(gtk.Window): self.handler.build.connect("build-failed", self.handler_build_failed_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) self.handler.connect("generating-data", self.handler_generating_data_cb) self.handler.connect("data-generated", self.handler_data_generated_cb) self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) @@ -624,10 +625,6 @@ class Builder(gtk.Window): self.rcppkglist_populated() if self.current_step == self.FAST_IMAGE_GENERATING: self.generate_image_async() - elif self.current_step == self.PACKAGE_GENERATING: - self.switch_page(self.PACKAGE_GENERATED) - elif self.current_step == self.IMAGE_GENERATING: - self.switch_page(self.IMAGE_GENERATED) def handler_command_failed_cb(self, handler, msg): if msg: @@ -755,6 +752,11 @@ class Builder(gtk.Window): self.handler.build_succeeded_async() self.stopping = False + if self.current_step == self.PACKAGE_GENERATING: + self.switch_page(self.PACKAGE_GENERATED) + elif self.current_step == self.IMAGE_GENERATING: + self.switch_page(self.IMAGE_GENERATED) + def build_failed(self): if self.stopping: status = "stop" @@ -785,6 +787,14 @@ class Builder(gtk.Window): def handler_build_failed_cb(self, running_build): self.build_failed() + def handler_no_provider_cb(self, running_build, msg): + dialog = CrumbsMessageDialog(self, msg, gtk.STOCK_DIALOG_INFO) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) + dialog.run() + dialog.destroy() + self.build_failed() + def handler_task_started_cb(self, running_build, message): fraction = message["current"] * 1.0/message["total"] title = "Build packages" -- cgit v1.2.3-54-g00ecf