Hob: Fix bug 2249
Hi Richard,
This pull request is to fix bug 2249, please help to review and pull.
Thanks,
Dongxiao
The following changes since commit 95f4e9dc351f67442844ff52f90fc154fa95ba95:
Hob: reset user recipe selection and package selection after settings are changed (2012-04-14 23:48:36 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
Dongxiao Xu (1):
Hob: Handle NoProvider event in runningbuild module
lib/bb/ui/crumbs/builder.py | 18 ++++++++++++++---- lib/bb/ui/crumbs/hobeventhandler.py | 21 --------------------- lib/bb/ui/crumbs/runningbuild.py | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 25 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/1 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]
--- lib/bb/ui/crumbs/builder.py | 18 ++++++++++++++---- lib/bb/ui/crumbs/hobeventhandler.py | 21 --------------------- lib/bb/ui/crumbs/runningbuild.py | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 25 deletions(-)
lib/bb/ui/crumbs/builder.py +14 -4
@@ -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"
lib/bb/ui/crumbs/hobeventhandler.py +0 -21
@@ -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()
lib/bb/ui/crumbs/runningbuild.py +17 -0
@@ -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
Signature · 1 line
1.7.4.1