diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-04-15 15:26:37 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-15 17:31:57 +0100 |
commit | 74211e0372da92bd6b8600bee9e5624f044127a6 (patch) | |
tree | 79526597accae1f9c046d51f6d7c1f8c9427afdb /bitbake/lib | |
parent | a5210e47b08e0ee42e9e188d83953203147a994d (diff) | |
download | ast2050-yocto-poky-74211e0372da92bd6b8600bee9e5624f044127a6.zip ast2050-yocto-poky-74211e0372da92bd6b8600bee9e5624f044127a6.tar.gz |
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 <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 18 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 21 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/runningbuild.py | 17 |
3 files changed, 31 insertions, 25 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 48053b3..dd59d59 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" diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 7a3cc6b..a61cca0 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -180,27 +180,6 @@ class HobHandler(gobject.GObject): elif isinstance(event, bb.command.CommandCompleted): self.current_phase = None self.run_next_command() - # TODO: Currently there are NoProvider issues when generate - # universe tree dependency for non-x86 architecture. - # Comment the follow code to enable the build of non-x86 - # architectures in Hob. - #elif isinstance(event, bb.event.NoProvider): - # if event._runtime: - # r = "R" - # else: - # r = "" - # if event._dependees: - # self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r) - # else: - # self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item) - # if event._reasons: - # for reason in event._reasons: - # self.error_msg += " %s" % reason - - # self.commands_async = [] - # self.emit("command-failed", self.error_msg) - # self.error_msg = "" - elif isinstance(event, bb.command.CommandFailed): self.commands_async = [] self.clear_busy() diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index 042902e..8cf36ee 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py @@ -82,6 +82,9 @@ class RunningBuild (gobject.GObject): 'log-error' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), + 'no-provider' : (gobject.SIGNAL_RUN_LAST, + gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT,)), } pids_to_task = {} tasks_to_iter = {} @@ -320,6 +323,20 @@ class RunningBuild (gobject.GObject): message["title"] = "" message["task"] = event.taskstring self.emit("task-started", message) + elif isinstance(event, bb.event.NoProvider): + msg = "" + if event._runtime: + r = "R" + else: + r = "" + if event._dependees: + msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)\n" % (r, event._item, ", ".join(event._dependees), r) + else: + msg = "Nothing %sPROVIDES '%s'\n" % (r, event._item) + if event._reasons: + for reason in event._reasons: + msg += ("%s\n" % reason) + self.emit("no-provider", msg) return |