summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-04-15 15:26:37 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-15 17:31:57 +0100
commit74211e0372da92bd6b8600bee9e5624f044127a6 (patch)
tree79526597accae1f9c046d51f6d7c1f8c9427afdb /bitbake
parenta5210e47b08e0ee42e9e188d83953203147a994d (diff)
downloadpoky-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')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py18
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py21
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py17
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 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):
349 self.handler.build.connect("build-failed", self.handler_build_failed_cb) 349 self.handler.build.connect("build-failed", self.handler_build_failed_cb)
350 self.handler.build.connect("task-started", self.handler_task_started_cb) 350 self.handler.build.connect("task-started", self.handler_task_started_cb)
351 self.handler.build.connect("log-error", self.handler_build_failure_cb) 351 self.handler.build.connect("log-error", self.handler_build_failure_cb)
352 self.handler.build.connect("no-provider", self.handler_no_provider_cb)
352 self.handler.connect("generating-data", self.handler_generating_data_cb) 353 self.handler.connect("generating-data", self.handler_generating_data_cb)
353 self.handler.connect("data-generated", self.handler_data_generated_cb) 354 self.handler.connect("data-generated", self.handler_data_generated_cb)
354 self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) 355 self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
@@ -624,10 +625,6 @@ class Builder(gtk.Window):
624 self.rcppkglist_populated() 625 self.rcppkglist_populated()
625 if self.current_step == self.FAST_IMAGE_GENERATING: 626 if self.current_step == self.FAST_IMAGE_GENERATING:
626 self.generate_image_async() 627 self.generate_image_async()
627 elif self.current_step == self.PACKAGE_GENERATING:
628 self.switch_page(self.PACKAGE_GENERATED)
629 elif self.current_step == self.IMAGE_GENERATING:
630 self.switch_page(self.IMAGE_GENERATED)
631 628
632 def handler_command_failed_cb(self, handler, msg): 629 def handler_command_failed_cb(self, handler, msg):
633 if msg: 630 if msg:
@@ -755,6 +752,11 @@ class Builder(gtk.Window):
755 self.handler.build_succeeded_async() 752 self.handler.build_succeeded_async()
756 self.stopping = False 753 self.stopping = False
757 754
755 if self.current_step == self.PACKAGE_GENERATING:
756 self.switch_page(self.PACKAGE_GENERATED)
757 elif self.current_step == self.IMAGE_GENERATING:
758 self.switch_page(self.IMAGE_GENERATED)
759
758 def build_failed(self): 760 def build_failed(self):
759 if self.stopping: 761 if self.stopping:
760 status = "stop" 762 status = "stop"
@@ -785,6 +787,14 @@ class Builder(gtk.Window):
785 def handler_build_failed_cb(self, running_build): 787 def handler_build_failed_cb(self, running_build):
786 self.build_failed() 788 self.build_failed()
787 789
790 def handler_no_provider_cb(self, running_build, msg):
791 dialog = CrumbsMessageDialog(self, msg, gtk.STOCK_DIALOG_INFO)
792 button = dialog.add_button("Close", gtk.RESPONSE_OK)
793 HobButton.style_button(button)
794 dialog.run()
795 dialog.destroy()
796 self.build_failed()
797
788 def handler_task_started_cb(self, running_build, message): 798 def handler_task_started_cb(self, running_build, message):
789 fraction = message["current"] * 1.0/message["total"] 799 fraction = message["current"] * 1.0/message["total"]
790 title = "Build packages" 800 title = "Build packages"
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 7a3cc6b3f9..a61cca014b 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):
180 elif isinstance(event, bb.command.CommandCompleted): 180 elif isinstance(event, bb.command.CommandCompleted):
181 self.current_phase = None 181 self.current_phase = None
182 self.run_next_command() 182 self.run_next_command()
183 # TODO: Currently there are NoProvider issues when generate
184 # universe tree dependency for non-x86 architecture.
185 # Comment the follow code to enable the build of non-x86
186 # architectures in Hob.
187 #elif isinstance(event, bb.event.NoProvider):
188 # if event._runtime:
189 # r = "R"
190 # else:
191 # r = ""
192 # if event._dependees:
193 # self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
194 # else:
195 # self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
196 # if event._reasons:
197 # for reason in event._reasons:
198 # self.error_msg += " %s" % reason
199
200 # self.commands_async = []
201 # self.emit("command-failed", self.error_msg)
202 # self.error_msg = ""
203
204 elif isinstance(event, bb.command.CommandFailed): 183 elif isinstance(event, bb.command.CommandFailed):
205 self.commands_async = [] 184 self.commands_async = []
206 self.clear_busy() 185 self.clear_busy()
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index 042902e48c..8cf36ee24e 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):
82 'log-error' : (gobject.SIGNAL_RUN_LAST, 82 'log-error' : (gobject.SIGNAL_RUN_LAST,
83 gobject.TYPE_NONE, 83 gobject.TYPE_NONE,
84 ()), 84 ()),
85 'no-provider' : (gobject.SIGNAL_RUN_LAST,
86 gobject.TYPE_NONE,
87 (gobject.TYPE_PYOBJECT,)),
85 } 88 }
86 pids_to_task = {} 89 pids_to_task = {}
87 tasks_to_iter = {} 90 tasks_to_iter = {}
@@ -320,6 +323,20 @@ class RunningBuild (gobject.GObject):
320 message["title"] = "" 323 message["title"] = ""
321 message["task"] = event.taskstring 324 message["task"] = event.taskstring
322 self.emit("task-started", message) 325 self.emit("task-started", message)
326 elif isinstance(event, bb.event.NoProvider):
327 msg = ""
328 if event._runtime:
329 r = "R"
330 else:
331 r = ""
332 if event._dependees:
333 msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)\n" % (r, event._item, ", ".join(event._dependees), r)
334 else:
335 msg = "Nothing %sPROVIDES '%s'\n" % (r, event._item)
336 if event._reasons:
337 for reason in event._reasons:
338 msg += ("%s\n" % reason)
339 self.emit("no-provider", msg)
323 340
324 return 341 return
325 342