* [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement
@ 2012-03-29 12:01 Dongxiao Xu
2012-03-29 12:01 ` [PATCH 01/14] Hob: Remove un-used signal and functions Dongxiao Xu
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Hi Richard,
This pull request contains Hob related bug fixes and enhancement.
Please help to review and pull.
Thanks,
Dongxiao
The following changes since commit f9cf2671c0ecad153db11bca1aebe151213bfb42:
bb.build: use relative log links, not absolute (2012-03-28 22:28:00 +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 (14):
Hob: Remove un-used signal and functions
Hob: Fix adding duplicated meta-hob layer
Hob: Define a variable to store the image name and toolchain
Hob: Improve the matching for runnable machine type
command.py: Move triggerEvent to command async class
Hob: Improve for init a new build
Hob: Fix MACHINE setting
Hob: Inherit image_types.bbclass in set_user_config()
Hob: Update configuration after parsing
Hob: Remember user settings when reparse config
Hob: Update the cache when setting changed
Hob: Change the format to store image_fstype variable
Hob: Fix the setting hash calculation
Hob: Replace "local.conf" in error message
lib/bb/command.py | 17 +++++----
lib/bb/ui/crumbs/builder.py | 65 ++++++++++++++++++++++++---------
lib/bb/ui/crumbs/hig.py | 40 ++++++++++++---------
lib/bb/ui/crumbs/hobeventhandler.py | 34 ++++++++----------
lib/bb/ui/crumbs/imagedetailspage.py | 3 +-
5 files changed, 97 insertions(+), 62 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 01/14] Hob: Remove un-used signal and functions
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 02/14] Hob: Fix adding duplicated meta-hob layer Dongxiao Xu
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 4 ----
lib/bb/ui/crumbs/hobeventhandler.py | 9 +--------
2 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 2af14dc..6b16ac8 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -245,7 +245,6 @@ class Builder(gtk.Window):
self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
self.handler.connect("config-updated", self.handler_config_updated_cb)
self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
- self.handler.connect("layers-updated", self.handler_layers_updated_cb)
self.handler.connect("parsing-started", self.handler_parsing_started_cb)
self.handler.connect("parsing", self.handler_parsing_cb)
self.handler.connect("parsing-completed", self.handler_parsing_completed_cb)
@@ -452,9 +451,6 @@ class Builder(gtk.Window):
def handler_package_formats_updated_cb(self, handler, formats):
self.parameters.all_package_formats = formats
- def handler_layers_updated_cb(self, handler, layers):
- self.parameters.all_layers = layers
-
def handler_command_succeeded_cb(self, handler, initcmd):
if initcmd == self.handler.PARSE_CONFIG:
# settings
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 9c5dc77..f189553 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -30,9 +30,6 @@ class HobHandler(gobject.GObject):
This object does BitBake event handling for the hob gui.
"""
__gsignals__ = {
- "layers-updated" : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- (gobject.TYPE_PYOBJECT,)),
"package-formats-updated" : (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE,
(gobject.TYPE_PYOBJECT,)),
@@ -152,7 +149,7 @@ class HobHandler(gobject.GObject):
self.package_model.populate(event._pkginfolist)
self.run_next_command()
- elif(isinstance(event, logging.LogRecord)):
+ elif isinstance(event, logging.LogRecord):
if event.levelno >= logging.ERROR:
self.error_msg += event.msg + '\n'
@@ -160,10 +157,6 @@ class HobHandler(gobject.GObject):
self.current_phase = "data generation"
if event._model:
self.recipe_model.populate(event._model)
- elif isinstance(event, bb.event.CoreBaseFilesFound):
- self.current_phase = "configuration lookup"
- paths = event._paths
- self.emit('layers-updated', paths)
elif isinstance(event, bb.event.ConfigFilesFound):
self.current_phase = "configuration lookup"
var = event._variable
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 02/14] Hob: Fix adding duplicated meta-hob layer
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
2012-03-29 12:01 ` [PATCH 01/14] Hob: Remove un-used signal and functions Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 03/14] Hob: Define a variable to store the image name and toolchain Dongxiao Xu
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
While adding meta-hob layer, we need to detect whether it already
exists in current layers.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hobeventhandler.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index f189553..1cbb027 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -383,7 +383,9 @@ class HobHandler(gobject.GObject):
params = {}
params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
hob_layer = params["core_base"] + "/meta-hob"
- params["layer"] = (self.server.runCommand(["getVariable", "BBLAYERS"]) or "") + " " + hob_layer
+ params["layer"] = self.server.runCommand(["getVariable", "BBLAYERS"]) or ""
+ if hob_layer not in params["layer"].split():
+ params["layer"] += (" " + hob_layer)
params["dldir"] = self.server.runCommand(["getVariable", "DL_DIR"]) or ""
params["machine"] = self.server.runCommand(["getVariable", "MACHINE"]) or ""
params["distro"] = self.server.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 03/14] Hob: Define a variable to store the image name and toolchain
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
2012-03-29 12:01 ` [PATCH 01/14] Hob: Remove un-used signal and functions Dongxiao Xu
2012-03-29 12:01 ` [PATCH 02/14] Hob: Fix adding duplicated meta-hob layer Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 04/14] Hob: Improve the matching for runnable machine type Dongxiao Xu
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 9 +++++++--
lib/bb/ui/crumbs/hobeventhandler.py | 8 +++++---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 6b16ac8..6b56a25 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -221,6 +221,9 @@ class Builder(gtk.Window):
def __init__(self, hobHandler, recipe_model, package_model):
super(Builder, self).__init__()
+ self.hob_image = "hob-image"
+ self.hob_toolchain = "hob-toolchain"
+
# handler
self.handler = hobHandler
@@ -435,8 +438,10 @@ class Builder(gtk.Window):
self.set_user_config()
all_packages = self.package_model.get_selected_packages()
self.handler.reset_build()
- self.handler.generate_image(all_packages, self.configuration.toolchain_build)
-
+ self.handler.generate_image(all_packages,
+ self.hob_image,
+ self.hob_toolchain,
+ self.configuration.toolchain_build)
# Callback Functions
def handler_config_updated_cb(self, handler, which, values):
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 1cbb027..e5e0b42 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -128,13 +128,13 @@ class HobHandler(gobject.GObject):
elif next_command == self.SUB_BUILD_IMAGE:
self.clear_busy()
self.building = True
- targets = ["hob-image"]
+ targets = [self.hob_image]
self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
if self.toolchain_build:
pkgs = self.package_queue + [i+'-dev' for i in self.package_queue] + [i+'-dbg' for i in self.package_queue]
self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(pkgs)])
- targets.append("hob-toolchain")
+ targets.append(self.hob_toolchain)
self.server.runCommand(["buildTargets", targets, "build"])
def handle_event(self, event):
@@ -351,8 +351,10 @@ class HobHandler(gobject.GObject):
self.commands_async.append(self.SUB_BUILD_RECIPES)
self.run_next_command(self.GENERATE_PACKAGES)
- def generate_image(self, tgts, toolchain_build=False):
+ def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_build=False):
self.package_queue = tgts
+ self.hob_image = hob_image
+ self.hob_toolchain = hob_toolchain
self.toolchain_build = toolchain_build
self.commands_async.append(self.SUB_PARSE_CONFIG)
self.commands_async.append(self.SUB_BUILD_IMAGE)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 04/14] Hob: Improve the matching for runnable machine type
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (2 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 03/14] Hob: Define a variable to store the image name and toolchain Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 05/14] command.py: Move triggerEvent to command async class Dongxiao Xu
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/imagedetailspage.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
index 276281d..46d55c8 100755
--- a/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/lib/bb/ui/crumbs/imagedetailspage.py
@@ -268,7 +268,8 @@ class ImageDetailsPage (HobPage):
break
for t in self.builder.parameters.runnable_machine_patterns:
- if t in image_name:
+ mach_string = image_name.strip(self.builder.hob_image + '-')
+ if mach_string.startswith(t):
mach_runnable = True
break
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 05/14] command.py: Move triggerEvent to command async class
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (3 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 04/14] Hob: Improve the matching for runnable machine type Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 06/14] Hob: Improve for init a new build Dongxiao Xu
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
The parameters in triggerEvent function is an event object, and it may
cost some time to pass this object through pipe, causing the pipe's
poll() function timeout. Change it to async mode.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/command.py | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 1799f1c..73aaca0 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -179,13 +179,6 @@ class CommandsSync:
"""
return bb.utils.cpu_count()
- def triggerEvent(self, command, params):
- """
- Trigger a certain event
- """
- event = params[0]
- bb.event.fire(eval(event), command.cooker.configuration.data)
-
class CommandsAsync:
"""
A class of asynchronous commands
@@ -359,3 +352,13 @@ class CommandsAsync:
command.cooker.parseConfigurationFiles(prefiles, postfiles)
command.finishAsyncCommand()
parseConfigurationFiles.needcache = False
+
+ def triggerEvent(self, command, params):
+ """
+ Trigger a certain event
+ """
+ event = params[0]
+ bb.event.fire(eval(event), command.cooker.configuration.data)
+ command.currentAsyncCommand = None
+ triggerEvent.needcache = False
+
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 06/14] Hob: Improve for init a new build
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (4 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 05/14] command.py: Move triggerEvent to command async class Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 07/14] Hob: Fix MACHINE setting Dongxiao Xu
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
After a successful build, user can initiate a new build by clicking
"Build a new image" button. The previous solution is simply switch to
the first screen and unset MACHINE. This commit will try to re-init
everything for the new build.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 6b56a25..eeaa278 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -932,7 +932,9 @@ class Builder(gtk.Window):
self.switch_page(self.RECIPE_SELECTION)
def initiate_new_build(self):
- self.configuration.curr_mach = ""
+ self.handler.init_cooker()
+ self.handler.set_extra_inherit("image_types")
+ self.handler.parse_config()
self.image_configuration_page.switch_machine_combo()
self.switch_page(self.MACHINE_SELECTION)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 07/14] Hob: Fix MACHINE setting
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (5 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 06/14] Hob: Improve for init a new build Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 08/14] Hob: Inherit image_types.bbclass in set_user_config() Dongxiao Xu
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Define the empty curr_mach to be "" instead of None.
Fix the judgement for ' if self.curr_mach == "" ' to be
' if self.curr_mach '.
Also set machine to bitbake server when "MACHINE" is not empty.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 4 ++--
lib/bb/ui/crumbs/hobeventhandler.py | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index eeaa278..b651643 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -493,7 +493,7 @@ class Builder(gtk.Window):
response = dialog.run()
dialog.destroy()
self.handler.clear_busy()
- self.configuration.curr_mach = None
+ self.configuration.curr_mach = ""
self.image_configuration_page.switch_machine_combo()
self.switch_page(self.MACHINE_SELECTION)
@@ -826,7 +826,7 @@ class Builder(gtk.Window):
self.configuration = dialog.configuration
# DO reparse recipes
if dialog.settings_changed:
- if self.configuration.curr_mach == "":
+ if not self.configuration.curr_mach:
self.switch_page(self.MACHINE_SELECTION)
else:
self.switch_page(self.RCPPKGINFO_POPULATING)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index e5e0b42..6efb9b0 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -258,7 +258,8 @@ class HobHandler(gobject.GObject):
self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
def set_machine(self, machine):
- self.server.runCommand(["setVariable", "MACHINE", machine])
+ if machine:
+ self.server.runCommand(["setVariable", "MACHINE", machine])
def set_sdk_machine(self, sdk_machine):
self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine])
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 08/14] Hob: Inherit image_types.bbclass in set_user_config()
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (6 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 07/14] Hob: Fix MACHINE setting Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 09/14] Hob: Update configuration after parsing Dongxiao Xu
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index b651643..0621600 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -404,6 +404,7 @@ class Builder(gtk.Window):
self.handler.set_image_fstypes(self.configuration.image_fstypes)
self.handler.set_extra_config(self.configuration.extra_setting)
self.handler.set_extra_inherit("packageinfo")
+ self.handler.set_extra_inherit("image_types")
# set proxies
if self.parameters.enable_proxy:
self.handler.set_http_proxy(self.configuration.http_proxy)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 09/14] Hob: Update configuration after parsing
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (7 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 08/14] Hob: Inherit image_types.bbclass in set_user_config() Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 10/14] Hob: Remember user settings when reparse config Dongxiao Xu
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
We need to update the parameters stored in Hob side after
configuration is parsed.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 0621600..924529f 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -78,6 +78,25 @@ class Configuration:
self.cvs_proxy_host = params["cvs_proxy_host"]
self.cvs_proxy_port = params["cvs_proxy_port"]
+ def update(self, params):
+ self.curr_distro = params["distro"]
+ self.dldir = params["dldir"]
+ self.sstatedir = params["sstatedir"]
+ self.sstatemirror = params["sstatemirror"]
+ self.pmake = params["pmake"]
+ self.bbthread = params["bbthread"]
+ self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
+ self.image_rootfs_size = params["image_rootfs_size"]
+ self.image_extra_size = params["image_extra_size"]
+ self.image_overhead_factor = params['image_overhead_factor']
+ self.incompat_license = params["incompat_license"]
+ self.curr_sdk_machine = params["sdk_machine"]
+ self.conf_version = params["conf_version"]
+ self.lconf_version = params["lconf_version"]
+ self.image_fstypes = params["image_fstypes"].split()
+ # bblayers.conf
+ self.layers = params["layer"].split()
+
def load(self, template):
self.curr_mach = template.getVar("MACHINE")
self.curr_package_format = " ".join(template.getVar("PACKAGE_CLASSES").split("package_")).strip()
@@ -465,10 +484,14 @@ class Builder(gtk.Window):
self.parameters = Parameters(params)
self.handler.generate_configuration()
elif initcmd == self.handler.GENERATE_CONFIGURATION:
+ params = self.handler.get_parameters()
+ self.configuration.update(params)
self.image_configuration_page.switch_machine_combo()
elif initcmd in [self.handler.GENERATE_RECIPES,
self.handler.GENERATE_PACKAGES,
self.handler.GENERATE_IMAGE]:
+ params = self.handler.get_parameters()
+ self.configuration.update(params)
self.handler.request_package_info_async()
elif initcmd == self.handler.POPULATE_PACKAGEINFO:
if self.current_step == self.RCPPKGINFO_POPULATING:
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 10/14] Hob: Remember user settings when reparse config
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (8 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 09/14] Hob: Update configuration after parsing Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 11/14] Hob: Update the cache when setting changed Dongxiao Xu
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
When config reparse is issued (e.x, adding a layer), we will firstly
remember the past user settings by setting them to bitbake server,
and then do the reparse.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 13 +++++++------
lib/bb/ui/crumbs/hobeventhandler.py | 8 +++-----
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 924529f..3ea9448 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -198,7 +198,7 @@ class Parameters:
class Builder(gtk.Window):
(MACHINE_SELECTION,
- LAYER_CHANGED,
+ CONFIG_UPDATED,
RCPPKGINFO_POPULATING,
RCPPKGINFO_POPULATED,
BASEIMG_SELECTED,
@@ -222,7 +222,7 @@ class Builder(gtk.Window):
__step2page__ = {
MACHINE_SELECTION : IMAGE_CONFIGURATION,
- LAYER_CHANGED : IMAGE_CONFIGURATION,
+ CONFIG_UPDATED : IMAGE_CONFIGURATION,
RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
BASEIMG_SELECTED : IMAGE_CONFIGURATION,
@@ -329,7 +329,7 @@ class Builder(gtk.Window):
if not os.path.exists(layer+'/conf/layer.conf'):
return False
- self.switch_page(self.LAYER_CHANGED)
+ self.switch_page(self.CONFIG_UPDATED)
self.template.destroy()
self.template = None
@@ -357,10 +357,11 @@ class Builder(gtk.Window):
if next_step == self.MACHINE_SELECTION: # init step
self.image_configuration_page.show_machine()
- elif next_step == self.LAYER_CHANGED:
+ elif next_step == self.CONFIG_UPDATED:
# after layers is changd by users
self.image_configuration_page.show_machine()
- self.handler.refresh_layers(self.configuration.layers)
+ self.set_user_config()
+ self.handler.parse_generate_configuration()
elif next_step == self.RCPPKGINFO_POPULATING:
# MACHINE CHANGED action or SETTINGS CHANGED
@@ -766,7 +767,7 @@ class Builder(gtk.Window):
self.configuration.layers = dialog.layers
# DO refresh layers
if dialog.layers_changed:
- self.switch_page(self.LAYER_CHANGED)
+ self.switch_page(self.CONFIG_UPDATED)
dialog.destroy()
def show_load_template_dialog(self):
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 6efb9b0..d1f36e62 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -243,11 +243,9 @@ class HobHandler(gobject.GObject):
self.commands_async.append(self.SUB_PARSE_CONFIG)
self.run_next_command(self.PARSE_CONFIG)
- def refresh_layers(self, bblayers):
- self.init_cooker()
- self.set_bblayers(bblayers)
- self.commands_async.append(self.SUB_PARSE_CONFIG)
- self.generate_configuration()
+ 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 ""
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 11/14] Hob: Update the cache when setting changed
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (9 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 10/14] Hob: Remember user settings when reparse config Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 12/14] Hob: Change the format to store image_fstype variable Dongxiao Xu
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
If values in advanced is changed, we also need to reparse the cache to
get the latest value.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 3ea9448..fd61b31 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -852,7 +852,7 @@ class Builder(gtk.Window):
# DO reparse recipes
if dialog.settings_changed:
if not self.configuration.curr_mach:
- self.switch_page(self.MACHINE_SELECTION)
+ self.switch_page(self.CONFIG_UPDATED)
else:
self.switch_page(self.RCPPKGINFO_POPULATING)
dialog.destroy()
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 12/14] Hob: Change the format to store image_fstype variable
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (10 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 11/14] Hob: Update the cache when setting changed Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 13/14] Hob: Fix the setting hash calculation Dongxiao Xu
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Use string format to store image_fstype instead of a list.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 6 +++---
lib/bb/ui/crumbs/hig.py | 7 ++++---
lib/bb/ui/crumbs/hobeventhandler.py | 2 +-
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index fd61b31..b5a6919 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -93,7 +93,7 @@ class Configuration:
self.curr_sdk_machine = params["sdk_machine"]
self.conf_version = params["conf_version"]
self.lconf_version = params["lconf_version"]
- self.image_fstypes = params["image_fstypes"].split()
+ self.image_fstypes = params["image_fstypes"]
# bblayers.conf
self.layers = params["layer"].split()
@@ -115,7 +115,7 @@ class Configuration:
self.lconf_version = template.getVar("LCONF_VERSION")
self.extra_setting = eval(template.getVar("EXTRA_SETTING"))
self.toolchain_build = eval(template.getVar("TOOLCHAIN_BUILD"))
- self.image_fstypes = template.getVar("IMAGE_FSTYPES").split()
+ self.image_fstypes = template.getVar("IMAGE_FSTYPES")
# bblayers.conf
self.layers = template.getVar("BBLAYERS").split()
# image/recipes/packages
@@ -152,7 +152,7 @@ class Configuration:
template.setVar("LCONF_VERSION", self.lconf_version)
template.setVar("EXTRA_SETTING", self.extra_setting)
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
- template.setVar("IMAGE_FSTYPES", " ".join(self.image_fstypes).lstrip(" "))
+ template.setVar("IMAGE_FSTYPES", self.image_fstypes)
# image/recipes/packages
self.selected_image = filename
template.setVar("__SELECTED_IMAGE__", self.selected_image)
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 4753c92..f5a7dd3 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -384,7 +384,7 @@ class AdvancedSettingDialog (CrumbsDialog):
self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
self.image_types_checkbuttons[image_type].set_tooltip_text("Build an %s image" % image_type)
table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1)
- if image_type in self.configuration.image_fstypes:
+ if image_type in self.configuration.image_fstypes.split():
self.image_types_checkbuttons[image_type].set_active(True)
i += 1
if i > rows:
@@ -608,10 +608,11 @@ class AdvancedSettingDialog (CrumbsDialog):
self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
- self.configuration.image_fstypes = []
+ self.configuration.image_fstypes = ""
for image_type in self.image_types:
if self.image_types_checkbuttons[image_type].get_active():
- self.configuration.image_fstypes.append(image_type)
+ self.configuration.image_fstypes += (" " + image_type)
+ self.configuration.image_fstypes.strip()
self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes
if self.gplv3_checkbox.get_active():
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index d1f36e62..9204e62 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -263,7 +263,7 @@ class HobHandler(gobject.GObject):
self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine])
def set_image_fstypes(self, image_fstypes):
- self.server.runCommand(["setVariable", "IMAGE_FSTYPES", " ".join(image_fstypes).lstrip(" ")])
+ self.server.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes])
def set_distro(self, distro):
if distro != "defaultsetup":
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 13/14] Hob: Fix the setting hash calculation
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (11 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 12/14] Hob: Change the format to store image_fstype variable Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 12:01 ` [PATCH 14/14] Hob: Replace "local.conf" in error message Dongxiao Xu
2012-03-29 20:22 ` [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Richard Purdie
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Sometimes even setting are not changed, the hash values differs due to
variable order issue. This commit fixes the issue.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hig.py | 33 +++++++++++++++++++--------------
1 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index f5a7dd3..ad02033 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -337,19 +337,30 @@ class AdvancedSettingDialog (CrumbsDialog):
self.setting_store = None
self.image_types_checkbuttons = {}
- self.variables = {}
- self.variables["PACKAGE_FORMAT"] = self.configuration.curr_package_format
- self.variables["INCOMPATIBLE_LICENSE"] = self.configuration.incompat_license
- self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes
- for key in self.configuration.extra_setting.keys():
- self.variables[key] = self.configuration.extra_setting[key]
- self.md5 = hashlib.md5(str(sorted(self.variables.items()))).hexdigest()
+ self.md5 = self.config_md5()
self.settings_changed = False
# create visual elements on the dialog
self.create_visual_elements()
self.connect("response", self.response_cb)
+ def _get_sorted_value(self, var):
+ return " ".join(sorted(str(var).split())) + "\n"
+
+ def config_md5(self):
+ data = ""
+ data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')
+ data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))
+ data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))
+ data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))
+ data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
+ data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
+ data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
+ data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
+ for key in self.configuration.extra_setting.keys():
+ data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
+ return hashlib.md5(data).hexdigest()
+
def create_visual_elements(self):
self.nb = gtk.Notebook()
self.nb.set_show_tabs(True)
@@ -589,15 +600,12 @@ class AdvancedSettingDialog (CrumbsDialog):
self.cvs_proxy_text.set_sensitive(self.enable_proxy)
def response_cb(self, dialog, response_id):
- self.variables = {}
-
package_format = []
package_format.append(self.rootfs_combo.get_active_text())
for child in self.check_hbox:
if isinstance(child, gtk.CheckButton) and child.get_active():
package_format.append(child.get_label())
self.configuration.curr_package_format = " ".join(package_format)
- self.variables["PACKAGE_FORMAT"] = self.configuration.curr_package_format
self.configuration.curr_distro = self.distro_combo.get_active_text()
self.configuration.dldir = self.dldir_text.get_text()
@@ -613,7 +621,6 @@ class AdvancedSettingDialog (CrumbsDialog):
if self.image_types_checkbuttons[image_type].get_active():
self.configuration.image_fstypes += (" " + image_type)
self.configuration.image_fstypes.strip()
- self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes
if self.gplv3_checkbox.get_active():
if "GPLv3" not in self.configuration.incompat_license.split():
@@ -623,7 +630,6 @@ class AdvancedSettingDialog (CrumbsDialog):
self.configuration.incompat_license = self.configuration.incompat_license.split().remove("GPLv3")
self.configuration.incompat_license = " ".join(self.configuration.incompat_license or [])
self.configuration.incompat_license = self.configuration.incompat_license.strip()
- self.variables["INCOMPATIBLE_LICENSE"] = self.configuration.incompat_license
self.configuration.toolchain_build = self.toolchain_checkbox.get_active()
@@ -633,7 +639,6 @@ class AdvancedSettingDialog (CrumbsDialog):
key = self.setting_store.get_value(it, 0)
value = self.setting_store.get_value(it, 1)
self.configuration.extra_setting[key] = value
- self.variables[key] = value
it = self.setting_store.iter_next(it)
self.configuration.all_proxy = self.all_proxy_text.get_text()
@@ -643,7 +648,7 @@ class AdvancedSettingDialog (CrumbsDialog):
self.configuration.git_proxy_host, self.configuration.git_proxy_port = self.git_proxy_text.get_text().split(':')
self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port = self.cvs_proxy_text.get_text().split(':')
- md5 = hashlib.md5(str(sorted(self.variables.items()))).hexdigest()
+ md5 = self.config_md5()
self.settings_changed = (self.md5 != md5)
#
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 14/14] Hob: Replace "local.conf" in error message
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (12 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 13/14] Hob: Fix the setting hash calculation Dongxiao Xu
@ 2012-03-29 12:01 ` Dongxiao Xu
2012-03-29 20:22 ` [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Richard Purdie
14 siblings, 0 replies; 16+ messages in thread
From: Dongxiao Xu @ 2012-03-29 12:01 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index b5a6919..a1a9228 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -510,6 +510,7 @@ class Builder(gtk.Window):
def handler_command_failed_cb(self, handler, msg):
if msg:
+ msg = msg.replace("your local.conf", "Settings")
lbl = "<b>Error</b>\n"
lbl = lbl + "%s\n\n" % msg
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
` (13 preceding siblings ...)
2012-03-29 12:01 ` [PATCH 14/14] Hob: Replace "local.conf" in error message Dongxiao Xu
@ 2012-03-29 20:22 ` Richard Purdie
14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2012-03-29 20:22 UTC (permalink / raw)
To: Dongxiao Xu; +Cc: bitbake-devel
On Thu, 2012-03-29 at 20:01 +0800, Dongxiao Xu wrote:
> Hi Richard,
>
> This pull request contains Hob related bug fixes and enhancement.
> Please help to review and pull.
>
> Thanks,
> Dongxiao
>
> The following changes since commit f9cf2671c0ecad153db11bca1aebe151213bfb42:
>
> bb.build: use relative log links, not absolute (2012-03-28 22:28:00 +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 (14):
> Hob: Remove un-used signal and functions
> Hob: Fix adding duplicated meta-hob layer
> Hob: Define a variable to store the image name and toolchain
> Hob: Improve the matching for runnable machine type
> command.py: Move triggerEvent to command async class
> Hob: Improve for init a new build
> Hob: Inherit image_types.bbclass in set_user_config()
> Hob: Update configuration after parsing
> Hob: Remember user settings when reparse config
> Hob: Change the format to store image_fstype variable
> Hob: Fix the setting hash calculation
> Hob: Replace "local.conf" in error message
I merged these, thanks.
> Hob: Fix MACHINE setting
> Hob: Update the cache when setting changed
These didn't apply so please send an updated patch against master.
Cheers,
Richard
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-03-29 20:31 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 12:01 [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Dongxiao Xu
2012-03-29 12:01 ` [PATCH 01/14] Hob: Remove un-used signal and functions Dongxiao Xu
2012-03-29 12:01 ` [PATCH 02/14] Hob: Fix adding duplicated meta-hob layer Dongxiao Xu
2012-03-29 12:01 ` [PATCH 03/14] Hob: Define a variable to store the image name and toolchain Dongxiao Xu
2012-03-29 12:01 ` [PATCH 04/14] Hob: Improve the matching for runnable machine type Dongxiao Xu
2012-03-29 12:01 ` [PATCH 05/14] command.py: Move triggerEvent to command async class Dongxiao Xu
2012-03-29 12:01 ` [PATCH 06/14] Hob: Improve for init a new build Dongxiao Xu
2012-03-29 12:01 ` [PATCH 07/14] Hob: Fix MACHINE setting Dongxiao Xu
2012-03-29 12:01 ` [PATCH 08/14] Hob: Inherit image_types.bbclass in set_user_config() Dongxiao Xu
2012-03-29 12:01 ` [PATCH 09/14] Hob: Update configuration after parsing Dongxiao Xu
2012-03-29 12:01 ` [PATCH 10/14] Hob: Remember user settings when reparse config Dongxiao Xu
2012-03-29 12:01 ` [PATCH 11/14] Hob: Update the cache when setting changed Dongxiao Xu
2012-03-29 12:01 ` [PATCH 12/14] Hob: Change the format to store image_fstype variable Dongxiao Xu
2012-03-29 12:01 ` [PATCH 13/14] Hob: Fix the setting hash calculation Dongxiao Xu
2012-03-29 12:01 ` [PATCH 14/14] Hob: Replace "local.conf" in error message Dongxiao Xu
2012-03-29 20:22 ` [PATCH 00/14][PULL] Hob: Bugfix and feature enhancement Richard Purdie
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.