* [PATCH 0/2 v2][PULL] Hob: Fix bug 2249
@ 2012-04-15 7:26 Dongxiao Xu
2012-04-15 7:26 ` [PATCH 1/2] Hob: Handle NoProvider event in runningbuild module Dongxiao Xu
2012-04-15 7:26 ` [PATCH 2/2] Hob: Simplify the init process Dongxiao Xu
0 siblings, 2 replies; 3+ messages in thread
From: Dongxiao Xu @ 2012-04-15 7:26 UTC (permalink / raw)
To: bitbake-devel
Hi Richard,
This is the second pull request that fixes bug 2249.
Besides, this adds another commit to simplify the Hob init process.
Please help to review and pull.
Changes from v1:
1) Add a new commit to simplify the Hob init process.
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 (2):
Hob: Handle NoProvider event in runningbuild module
Hob: Simplify the init process
lib/bb/ui/crumbs/builder.py | 31 +++++++++++++++++--------------
lib/bb/ui/crumbs/hobeventhandler.py | 32 ++------------------------------
lib/bb/ui/crumbs/runningbuild.py | 17 +++++++++++++++++
3 files changed, 36 insertions(+), 44 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] Hob: Handle NoProvider event in runningbuild module
2012-04-15 7:26 [PATCH 0/2 v2][PULL] Hob: Fix bug 2249 Dongxiao Xu
@ 2012-04-15 7:26 ` Dongxiao Xu
2012-04-15 7:26 ` [PATCH 2/2] Hob: Simplify the init process Dongxiao Xu
1 sibling, 0 replies; 3+ messages in thread
From: Dongxiao Xu @ 2012-04-15 7:26 UTC (permalink / raw)
To: bitbake-devel
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]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
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(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 48053b3..dd59d59 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/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/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 7a3cc6b..a61cca0 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/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/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py
index 042902e..8cf36ee 100644
--- a/lib/bb/ui/crumbs/runningbuild.py
+++ b/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
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] Hob: Simplify the init process
2012-04-15 7:26 [PATCH 0/2 v2][PULL] Hob: Fix bug 2249 Dongxiao Xu
2012-04-15 7:26 ` [PATCH 1/2] Hob: Handle NoProvider event in runningbuild module Dongxiao Xu
@ 2012-04-15 7:26 ` Dongxiao Xu
1 sibling, 0 replies; 3+ messages in thread
From: Dongxiao Xu @ 2012-04-15 7:26 UTC (permalink / raw)
To: bitbake-devel
This commit merges some functionalities together and avoid unnecessary
signal handling. This can help to speed up the Hob startup.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 13 +++----------
lib/bb/ui/crumbs/hobeventhandler.py | 11 ++---------
2 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index dd59d59..cd66c3f 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -398,12 +398,12 @@ class Builder(gtk.Window):
if self.load_template(TemplateMgr.convert_to_template_pathfilename("default", ".hob/")) == None:
self.handler.init_cooker()
self.handler.set_extra_inherit("image_types")
- self.handler.parse_config()
+ self.handler.generate_configuration()
def update_config_async(self):
self.switch_page(self.MACHINE_SELECTION)
self.set_user_config()
- self.handler.parse_generate_configuration()
+ self.handler.generate_configuration()
def populate_recipe_package_info_async(self):
self.switch_page(self.RCPPKGINFO_POPULATING)
@@ -456,9 +456,6 @@ class Builder(gtk.Window):
def cancel_build_sync(self, force=False):
self.handler.cancel_build(force)
- def generate_configuration_async(self):
- self.handler.generate_configuration()
-
def cancel_parse_sync(self):
self.handler.cancel_parse()
@@ -604,11 +601,7 @@ class Builder(gtk.Window):
self.parameters.all_package_formats = formats
def handler_command_succeeded_cb(self, handler, initcmd):
- if initcmd == self.handler.PARSE_CONFIG:
- # settings
- self.update_configuration_parameters(self.get_parameters_sync())
- self.generate_configuration_async()
- elif initcmd == self.handler.GENERATE_CONFIGURATION:
+ if initcmd == self.handler.GENERATE_CONFIGURATION:
self.update_configuration_parameters(self.get_parameters_sync())
self.image_configuration_page.switch_machine_combo()
elif initcmd in [self.handler.GENERATE_RECIPES,
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index a61cca0..216b406 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -59,7 +59,7 @@ class HobHandler(gobject.GObject):
(gobject.TYPE_PYOBJECT,)),
}
- (PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6)
+ (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5)
(SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(10)
def __init__(self, server, recipe_model, package_model):
@@ -219,14 +219,6 @@ class HobHandler(gobject.GObject):
def init_cooker(self):
self.server.runCommand(["initCooker"])
- def parse_config(self):
- self.commands_async.append(self.SUB_PARSE_CONFIG)
- self.run_next_command(self.PARSE_CONFIG)
-
- def parse_generate_configuration(self):
- self.commands_async.append(self.SUB_PARSE_CONFIG)
- self.generate_configuration()
-
def set_extra_inherit(self, bbclass):
inherits = self.server.runCommand(["getVariable", "INHERIT"]) or ""
inherits = inherits + " " + bbclass
@@ -312,6 +304,7 @@ class HobHandler(gobject.GObject):
self.run_next_command(self.POPULATE_PACKAGEINFO)
def generate_configuration(self):
+ self.commands_async.append(self.SUB_PARSE_CONFIG)
self.commands_async.append(self.SUB_PATH_LAYERS)
self.commands_async.append(self.SUB_FILES_DISTRO)
self.commands_async.append(self.SUB_FILES_MACH)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-15 7:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-15 7:26 [PATCH 0/2 v2][PULL] Hob: Fix bug 2249 Dongxiao Xu
2012-04-15 7:26 ` [PATCH 1/2] Hob: Handle NoProvider event in runningbuild module Dongxiao Xu
2012-04-15 7:26 ` [PATCH 2/2] Hob: Simplify the init process Dongxiao Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.