Hob: Bugfix and feature enhancement
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(-)
Signature · 1 line
1.7.4.1
PATCH 1/14 Hob: Remove un-used signal and functions
--- lib/bb/ui/crumbs/builder.py | 4 ---- lib/bb/ui/crumbs/hobeventhandler.py | 9 +-------- 2 files changed, 1 insertions(+), 12 deletions(-)
lib/bb/ui/crumbs/builder.py +0 -4
@@ -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
lib/bb/ui/crumbs/hobeventhandler.py +1 -8
@@ -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
Signature · 1 line
1.7.4.1
PATCH 3/14 Hob: Define a variable to store the image name and toolchain
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/builder.py | 9 +++++++-- lib/bb/ui/crumbs/hobeventhandler.py | 8 +++++--- 2 files changed, 12 insertions(+), 5 deletions(-)
lib/bb/ui/crumbs/builder.py +7 -2
@@ -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):
lib/bb/ui/crumbs/hobeventhandler.py +5 -3
@@ -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)
Signature · 1 line
1.7.4.1
PATCH 2/14 Hob: Fix adding duplicated meta-hob layer
In reply to Dongxiao XuWhile adding meta-hob layer, we need to detect whether it already exists in current layers.
--- lib/bb/ui/crumbs/hobeventhandler.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +3 -1
@@ -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"
Signature · 1 line
1.7.4.1
PATCH 4/14 Hob: Improve the matching for runnable machine type
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/imagedetailspage.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/imagedetailspage.py +2 -1
@@ -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
Signature · 1 line
1.7.4.1
PATCH 5/14 command.py: Move triggerEvent to command async class
In reply to Dongxiao XuThe 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.
--- lib/bb/command.py | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-)
lib/bb/command.py +10 -7
@@ -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 +
Signature · 1 line
1.7.4.1
PATCH 6/14 Hob: Improve for init a new build
In reply to Dongxiao XuAfter 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.
--- lib/bb/ui/crumbs/builder.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/builder.py +3 -1
@@ -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)
Signature · 1 line
1.7.4.1
PATCH 7/14 Hob: Fix MACHINE setting
In reply to Dongxiao XuDefine 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.
--- lib/bb/ui/crumbs/builder.py | 4 ++-- lib/bb/ui/crumbs/hobeventhandler.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
lib/bb/ui/crumbs/builder.py +2 -2
@@ -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)
lib/bb/ui/crumbs/hobeventhandler.py +2 -1
@@ -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])
Signature · 1 line
1.7.4.1
PATCH 8/14 Hob: Inherit image_types.bbclass in set_user_config()
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/builder.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
lib/bb/ui/crumbs/builder.py +1 -0
@@ -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)
Signature · 1 line
1.7.4.1
PATCH 9/14 Hob: Update configuration after parsing
In reply to Dongxiao XuWe need to update the parameters stored in Hob side after configuration is parsed.
--- lib/bb/ui/crumbs/builder.py | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
lib/bb/ui/crumbs/builder.py +23 -0
@@ -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:
Signature · 1 line
1.7.4.1
PATCH 10/14 Hob: Remember user settings when reparse config
In reply to Dongxiao XuWhen 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.
--- lib/bb/ui/crumbs/builder.py | 13 +++++++------ lib/bb/ui/crumbs/hobeventhandler.py | 8 +++----- 2 files changed, 10 insertions(+), 11 deletions(-)
lib/bb/ui/crumbs/builder.py +7 -6
@@ -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):
lib/bb/ui/crumbs/hobeventhandler.py +3 -5
@@ -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 ""
Signature · 1 line
1.7.4.1
PATCH 11/14 Hob: Update the cache when setting changed
In reply to Dongxiao XuIf values in advanced is changed, we also need to reparse the cache to get the latest value.
--- lib/bb/ui/crumbs/builder.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/builder.py +1 -1
@@ -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()
Signature · 1 line
1.7.4.1
PATCH 12/14 Hob: Change the format to store image_fstype variable
In reply to Dongxiao XuUse string format to store image_fstype instead of a list.
--- 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(-)
lib/bb/ui/crumbs/builder.py +3 -3
@@ -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)
lib/bb/ui/crumbs/hig.py +4 -3
@@ -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():
lib/bb/ui/crumbs/hobeventhandler.py +1 -1
@@ -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":
Signature · 1 line
1.7.4.1
PATCH 13/14 Hob: Fix the setting hash calculation
In reply to Dongxiao XuSometimes even setting are not changed, the hash values differs due to variable order issue. This commit fixes the issue.
--- lib/bb/ui/crumbs/hig.py | 33 +++++++++++++++++++-------------- 1 files changed, 19 insertions(+), 14 deletions(-)
lib/bb/ui/crumbs/hig.py +19 -14
@@ -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) #
Signature · 1 line
1.7.4.1
PATCH 14/14 Hob: Replace "local.conf" in error message
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/builder.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
lib/bb/ui/crumbs/builder.py +1 -0
@@ -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)
Signature · 1 line
1.7.4.1
Richard Purdie
AppliedQuoted 16 lines · Dongxiao Xu
Hi Richard,
This pull request contains Hob related bug fixes and enhancement. Please help to review and pull.
Thanks,
DongxiaoThe 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-contribdxu4/hob-bugfix
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
Quoted 13 lines
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 typecommand.py: Move triggerEvent to command async class
Hob: Improve for init a new build
Hob: Inherit image_types.bbclass inset_user_config()
Hob: Update configuration after parsing
Hob: Remember user settings when reparse config
Hob: Change the format to storeimage_fstypevariable
Hob: Fix the setting hash calculation
Hob: Replace "local.conf" in error message
I merged these, thanks.
Quoted 2 lines
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