Hob: Bunch of bug fixes
PATCH 1/17 Hob: Still use initcmd != None as the if judgement
In reply to Dongxiao XuThis commit reverts part of change in 491c87d1, since initcmd has a possible value of 0, therefore we must explicitly compare the initcmd with None in if judgement.
--- lib/bb/ui/crumbs/hobeventhandler.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +2 -2
@@ -119,7 +119,7 @@ class HobHandler(gobject.GObject): self.generating = False def run_next_command(self, initcmd=None): - if initcmd: + if initcmd != None: self.initcmd = initcmd if self.commands_async:
@@ -127,7 +127,7 @@ class HobHandler(gobject.GObject): next_command = self.commands_async.pop(0) else: self.clear_busy() - if self.initcmd: + if self.initcmd != None: self.emit("command-succeeded", self.initcmd) return
Signature · 1 line
1.7.4.1
PATCH 3/17 cooker: terminate each process when quitting recipe parsing
In reply to Dongxiao XuIn some cases (e.x., Hob), users may quit the GUI when bitbake server is doing the recipe parsing. In this case, we will see the Hob command line hang and could not return to shell (Ctrl+C doesn't work).
The fix is to terminate the process when exiting the parsing.
This fixes [YOCTO #2142]
--- lib/bb/cooker.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
lib/bb/cooker.py +1 -0
@@ -1603,6 +1603,7 @@ class CookerParser(object): self.parser_quit.cancel_join_thread() for process in self.processes: + process.terminate() self.parser_quit.put(None) self.jobs.cancel_join_thread()
Signature · 1 line
1.7.4.1
PATCH 8/17 Hob: Change parseConfigurationFiles API usage
In reply to Dongxiao XuparseConfigurationFiles API is changed to sync mode, therefore make accordingly changes in Hob part.
--- lib/bb/ui/crumbs/hobeventhandler.py | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +8 -7
@@ -62,7 +62,7 @@ class HobHandler(gobject.GObject): (gobject.TYPE_PYOBJECT,)), } - (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_CONFIG, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(13) + (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(12) (LAYERS_REFRESH, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5) def __init__(self, server, recipe_model, package_model):
@@ -134,8 +134,6 @@ class HobHandler(gobject.GObject): self.server.runCommand(["findConfigFiles", "MACHINE-SDK"]) elif next_command == self.FILES_MATCH_CLASS: self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"]) - elif next_command == self.PARSE_CONFIG: - self.server.runCommand(["parseConfigurationFiles", "", ""]) elif next_command == self.PARSE_BBFILES: self.server.runCommand(["parseFiles"]) elif next_command == self.GENERATE_TGTS:
@@ -265,10 +263,13 @@ class HobHandler(gobject.GObject): def init_cooker(self): self.server.runCommand(["initCooker"]) + def parse_config(self): + self.server.runCommand(["parseConfigurationFiles", "", ""]) + def refresh_layers(self, bblayers): self.server.runCommand(["initCooker"]) self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)]) - self.commands_async.append(self.PARSE_CONFIG) + self.parse_config() self.commands_async.append(self.CFG_FILES_DISTRO) self.commands_async.append(self.CFG_FILES_MACH) self.commands_async.append(self.CFG_FILES_SDKMACH)
@@ -336,7 +337,7 @@ class HobHandler(gobject.GObject): self.run_next_command(self.POPULATE_PACKAGEINFO) def generate_recipes(self): - self.commands_async.append(self.PARSE_CONFIG) + self.parse_config() self.commands_async.append(self.GENERATE_TGTS) self.run_next_command(self.GENERATE_RECIPES)
@@ -344,7 +345,7 @@ class HobHandler(gobject.GObject): targets = [] targets.extend(tgts) self.recipe_queue = targets - self.commands_async.append(self.PARSE_CONFIG) + self.parse_config() self.commands_async.append(self.PARSE_BBFILES) self.commands_async.append(self.BUILD_TARGET_RECIPES) self.run_next_command(self.GENERATE_PACKAGES)
@@ -352,7 +353,7 @@ class HobHandler(gobject.GObject): def generate_image(self, tgts, toolchain_build=False): self.package_queue = tgts self.toolchain_build = toolchain_build - self.commands_async.append(self.PARSE_CONFIG) + self.parse_config() self.commands_async.append(self.PARSE_BBFILES) self.commands_async.append(self.BUILD_TARGET_IMAGE) self.run_next_command(self.GENERATE_IMAGE)
Signature · 1 line
1.7.4.1
Hi Richard,
This pull request is Hob related bug fixes. Please help to review and pull.
Thanks,
Dongxiao
The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:
Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)
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: Still use initcmd != None as the if judgement
Hob: Remove split model in GTK Hob
cooker: terminate each process when quitting recipe parsing
Hob: change package classes selection GUI
Hob: Change template button name from "Template" to "Templates" command.py: Change parseConfigurationFiles API from async to sync process.py: Increase the timeout value for polling commands
Hob: Change parseConfigurationFiles API usage
Hob: Fix the workaround to get image types
Hob: Change recipe selection tab order
Hob: Change package selection tab order
Hob: Move "Create your own image" to the bottom of image list
cooker: add inherit information when generating package tree
Hob: Use inherit information to judge if a recipe is image type
Shane Wang (3):
Hob: Change window title from HOB to Hob
Hob: Change "View Packages" description
Hob: Change the titles for recipe view and package view
lib/bb/command.py | 17 +- lib/bb/cooker.py | 3 + lib/bb/server/process.py | 2 +- lib/bb/ui/crumbs/builder.py | 15 +-- lib/bb/ui/crumbs/hig.py | 284 ++++++++-------------------- lib/bb/ui/crumbs/hobeventhandler.py | 48 ++--- lib/bb/ui/crumbs/hoblistmodel.py | 11 +- lib/bb/ui/crumbs/imageconfigurationpage.py | 13 +- lib/bb/ui/crumbs/packageselectionpage.py | 42 ++-- lib/bb/ui/crumbs/recipeselectionpage.py | 50 +++--- lib/bb/ui/hob.py | 14 +- 11 files changed, 177 insertions(+), 322 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 2/17 Hob: Remove split model in GTK Hob
Since the GTK Hob will not use the server/client split model, thus remove it from current Hob code. But we still keep the core mechanism in bitbake server.
--- lib/bb/ui/crumbs/builder.py | 13 +---- lib/bb/ui/crumbs/hig.py | 103 ++++++++++++----------------------- lib/bb/ui/crumbs/hobeventhandler.py | 21 +------ lib/bb/ui/hob.py | 11 +---- 4 files changed, 41 insertions(+), 107 deletions(-)
lib/bb/ui/crumbs/builder.py +2 -11
@@ -260,21 +260,14 @@ class Builder(gtk.Window): self.show_all() self.nb.set_current_page(0) - def get_split_model(self): - return self.handler.split_model - def load_template(self, path): self.template = TemplateMgr() self.template.load(path) self.configuration.load(self.template) - if self.get_split_model(): - if not set(self.configuration.layers) <= set(self.parameters.all_layers): + for layer in self.configuration.layers: + if not os.path.exists(layer+'/conf/layer.conf'): return False - else: - for layer in self.configuration.layers: - if not os.path.exists(layer+'/conf/layer.conf'): - return False self.switch_page(self.LAYER_CHANGED)
@@ -674,7 +667,6 @@ class Builder(gtk.Window): dialog = LayerSelectionDialog(title = "Layer Selection", layers = copy.deepcopy(self.configuration.layers), all_layers = self.parameters.all_layers, - split_model = self.get_split_model(), parent = self, flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT
@@ -748,7 +740,6 @@ class Builder(gtk.Window): all_distros = self.parameters.all_distros, all_sdk_machines = self.parameters.all_sdk_machines, max_threads = self.parameters.max_threads, - split_model = self.get_split_model(), parent = self, flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT
lib/bb/ui/crumbs/hig.py +35 -68
186 lines not on this page · raw message
lib/bb/ui/crumbs/hobeventhandler.py +3 -18
@@ -65,7 +65,7 @@ class HobHandler(gobject.GObject): (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_CONFIG, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(13) (LAYERS_REFRESH, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5) - def __init__(self, server, server_addr, client_addr, recipe_model, package_model): + def __init__(self, server, recipe_model, package_model): super(HobHandler, self).__init__() self.build = RunningBuild(sequential=True)
@@ -84,20 +84,11 @@ class HobHandler(gobject.GObject): self.error_msg = "" self.initcmd = None - self.split_model = False - if server_addr and client_addr: - self.split_model = (server_addr != client_addr) - self.reset_server() # reset server if server was found just now - self.server_addr = server_addr - def kick(self): import xmlrpclib try: # kick the while thing off - if self.split_model: - self.commands_async.append(self.CFG_AVAIL_LAYERS) - else: - self.commands_async.append(self.CFG_PATH_LAYERS) + self.commands_async.append(self.CFG_PATH_LAYERS) self.commands_async.append(self.CFG_FILES_DISTRO) self.commands_async.append(self.CFG_FILES_MACH) self.commands_async.append(self.CFG_FILES_SDKMACH)
@@ -383,9 +374,6 @@ class HobHandler(gobject.GObject): # leave the workdir in a usable state self.server.runCommand(["stateShutdown"]) - def reset_server(self): - self.server.runCommand(["resetCooker"]) - def reset_build(self): self.build.reset()
@@ -427,10 +415,7 @@ class HobHandler(gobject.GObject): pmake = int(pmake.lstrip("-j ")) params["pmake"] = pmake - image_addr = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or "" - if self.server_addr: - image_addr = "http://" + self.server_addr + ":" + image_addr - params["image_addr"] = image_addr + params["image_addr"] = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or "" image_extra_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"]) if not image_extra_size:
lib/bb/ui/hob.py +1 -10
@@ -47,15 +47,6 @@ def event_handle_idle_func(eventHandler, hobHandler): return True def main (server = None, eventHandler = None): - bitbake_server = None - client_addr = None - server_addr = None - - if not eventHandler: - helper = uihelper.BBUIHelper() - server, eventHandler, server_addr, client_addr = helper.findServerDetails() - bitbake_server = server - gobject.threads_init() # That indicates whether the Hob and the bitbake server are
@@ -64,7 +55,7 @@ def main (server = None, eventHandler = None): recipe_model = RecipeListModel() package_model = PackageListModel() - hobHandler = HobHandler(bitbake_server, server_addr, client_addr, recipe_model, package_model) + hobHandler = HobHandler(server, recipe_model, package_model) if hobHandler.kick() == False: return 1 builder = Builder(hobHandler, recipe_model, package_model)
Signature · 1 line
1.7.4.1
PATCH 4/17 Hob: change package classes selection GUI
In reply to Dongxiao XuThis commit change the GUI for package classes selection in advanced setting dialog, which conforms with UI team's design.
--- lib/bb/ui/crumbs/hig.py | 183 ++++++++++++----------------------------------- 1 files changed, 46 insertions(+), 137 deletions(-)
lib/bb/ui/crumbs/hig.py +45 -136
@@ -191,146 +191,58 @@ class AdvancedSettingDialog (CrumbsDialog): hbox.show_all() return hbox, entry - def pkgfmt_widget_sort_func(self, model, iter1, iter2, data): - val1 = model.get_value(iter1, 0) - val2 = model.get_value(iter2, 0) - inc1 = model.get_value(iter1, 2) - inc2 = model.get_value(iter2, 2) - if inc1 != inc2: - return inc2 - inc1 - else: - return val1 - val2 - - def pkgfmt_widget_tree_selection_changed_cb(self, tree_selection, button1, button2): - (model, it) = tree_selection.get_selected() - inc = model.get_value(it, 2) - if inc: - button1.set_sensitive(True) - button2.set_sensitive(True) - else: - button1.set_sensitive(False) - button2.set_sensitive(False) - - def pkgfmt_widget_up_clicked_cb(self, button, tree_selection): - (model, it) = tree_selection.get_selected() - if not it: - return - path = model.get_path(it) - if path[0] <= 0: - return - - pre_it = model.get_iter_first() - if not pre_it: - return - else: - while model.iter_next(pre_it) : - if model.get_value(model.iter_next(pre_it), 1) != model.get_value(it, 1): - pre_it = model.iter_next(pre_it) - else: - break - - cur_index = model.get_value(it, 0) - pre_index = cur_index - if pre_it: - model.set(pre_it, 0, pre_index) - cur_index = cur_index - 1 - model.set(it, 0, cur_index) - - def pkgfmt_widget_down_clicked_cb(self, button, tree_selection): - (model, it) = tree_selection.get_selected() - if not it: - return - next_it = model.iter_next(it) - if not next_it: - return - cur_index = model.get_value(it, 0) - next_index = cur_index - model.set(next_it, 0, next_index) - cur_index = cur_index + 1 - model.set(it, 0, cur_index) - - def pkgfmt_widget_toggle_cb(self, cell, path, model, column): - it = model.get_iter(path) - val = model.get_value(it, column) - val = not val - model.set(it, column, val) + def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox): + combo_item = self.rootfs_combo.get_active_text() + for child in check_hbox.get_children(): + if isinstance(child, gtk.CheckButton): + check_hbox.remove(child) + for format in all_package_format: + if format != combo_item: + check_button = gtk.CheckButton(format) + check_hbox.pack_start(check_button, expand=False, fill=False) + check_hbox.show_all() def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip=""): - pkgfmt_hbox = gtk.HBox(False, 12) + pkgfmt_hbox = gtk.HBox(False, 24) - pkgfmt_store = gtk.ListStore(int, str, gobject.TYPE_BOOLEAN) - for format in curr_package_format.split(): - pkgfmt_store.set(pkgfmt_store.append(), 1, format, 2, True) - for format in all_package_format: - if format not in curr_package_format: - pkgfmt_store.set(pkgfmt_store.append(), 1, format, 2, False) - pkgfmt_tree = gtk.TreeView(pkgfmt_store) - pkgfmt_tree.set_headers_clickable(True) - pkgfmt_tree.set_headers_visible(False) - tree_selection = pkgfmt_tree.get_selection() - tree_selection.set_mode(gtk.SELECTION_SINGLE) + rootfs_vbox = gtk.VBox(False, 6) + pkgfmt_hbox.pack_start(rootfs_vbox, expand=False, fill=False) - col = gtk.TreeViewColumn('NO') - col.set_sort_column_id(0) - col.set_sort_order(gtk.SORT_ASCENDING) - col.set_clickable(False) - col1 = gtk.TreeViewColumn('TYPE') - col1.set_min_width(130) - col1.set_max_width(140) - col2 = gtk.TreeViewColumn('INCLUDED') - col2.set_min_width(60) - col2.set_max_width(70) - pkgfmt_tree.append_column(col1) - pkgfmt_tree.append_column(col2) - cell = gtk.CellRendererText() - cell1 = gtk.CellRendererText() - cell1.set_property('width-chars', 10) - cell2 = gtk.CellRendererToggle() - cell2.set_property('activatable', True) - cell2.connect("toggled", self.pkgfmt_widget_toggle_cb, pkgfmt_store, 2) - col.pack_start(cell, True) - col1.pack_start(cell1, True) - col2.pack_end(cell2, True) - col.set_attributes(cell, text=0) - col1.set_attributes(cell1, text=1) - col2.set_attributes(cell2, active=2) + label = self.gen_label_widget("Root file system package format") + rootfs_vbox.pack_start(label, expand=False, fill=False) - pkgfmt_store.set_sort_func(0, self.pkgfmt_widget_sort_func, None) - pkgfmt_store.set_sort_column_id(0, gtk.SORT_ASCENDING) + rootfs_format = "" + if curr_package_format: + rootfs_format = curr_package_format.split()[0] - scroll = gtk.ScrolledWindow() - scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - scroll.set_shadow_type(gtk.SHADOW_IN) - scroll.add(pkgfmt_tree) - scroll.set_size_request(200,60) - pkgfmt_hbox.pack_start(scroll, False, False, 0) + tooltip = "Package format that is used to generate rootfs" + rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip) + rootfs_vbox.pack_start(rootfs_format_widget, expand=False, fill=False) - vbox = gtk.VBox(False, 6) - pkgfmt_hbox.pack_start(vbox, False, False, 15) + extra_vbox = gtk.VBox(False, 6) + pkgfmt_hbox.pack_start(extra_vbox, expand=False, fill=False) - up = gtk.Button() - image = gtk.Image() - image.set_from_stock(gtk.STOCK_GO_UP, gtk.ICON_SIZE_MENU) - up.set_image(image) - up.set_size_request(50,30) - up.connect("clicked", self.pkgfmt_widget_up_clicked_cb, tree_selection) - vbox.pack_start(up, False, False, 5) + label = self.gen_label_widget("Additional package formats") + extra_vbox.pack_start(label, expand=False, fill=False) - down = gtk.Button() - image = gtk.Image() - image.set_from_stock(gtk.STOCK_GO_DOWN, gtk.ICON_SIZE_MENU) - down.set_image(image) - down.set_size_request(50,30) - down.connect("clicked", self.pkgfmt_widget_down_clicked_cb, tree_selection) - vbox.pack_start(down, False, False, 5) - tree_selection.connect("changed", self.pkgfmt_widget_tree_selection_changed_cb, up, down) + check_hbox = gtk.HBox(False, 12) + extra_vbox.pack_start(check_hbox, expand=False, fill=False) + for format in all_package_format: + if format != rootfs_format: + check_button = gtk.CheckButton(format) + is_active = (format in curr_package_format.split()) + check_button.set_active(is_active) + check_hbox.pack_start(check_button, expand=False, fill=False) + tooltip = "Extra package formats to build" info = HobInfoButton(tooltip, self) - pkgfmt_hbox.pack_start(info, expand=False, fill=False) + check_hbox.pack_end(info, expand=False, fill=False) + + rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox) pkgfmt_hbox.show_all() - return pkgfmt_hbox, pkgfmt_store + return pkgfmt_hbox, rootfs_combo, check_hbox def editable_settings_cell_edited(self, cell, path_string, new_text, model): it = model.get_iter_from_string(path_string)
@@ -431,7 +343,6 @@ class AdvancedSettingDialog (CrumbsDialog): self.max_threads = max_threads # class members for internal use - self.pkgfmt_store = None self.distro_combo = None self.dldir_text = None self.sstatedir_text = None
@@ -509,7 +420,7 @@ class AdvancedSettingDialog (CrumbsDialog): label = self.gen_label_widget("<span weight=\"bold\">Packaging Format:</span>") tooltip = "Select package formats that will be used. " tooltip += "The first format will be used for final image" - pkgfmt_widget, self.pkgfmt_store = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip) + pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip) sub_vbox.pack_start(label, expand=False, fill=False) sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
@@ -621,14 +532,12 @@ class AdvancedSettingDialog (CrumbsDialog): def response_cb(self, dialog, response_id): self.variables = {} - self.configuration.curr_package_format = "" - it = self.pkgfmt_store.get_iter_first() - while it: - value = self.pkgfmt_store.get_value(it, 2) - if value: - self.configuration.curr_package_format += (self.pkgfmt_store.get_value(it, 1) + " ") - it = self.pkgfmt_store.iter_next(it) - self.configuration.curr_package_format = self.configuration.curr_package_format.strip() + 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()
Signature · 1 line
1.7.4.1
PATCH 9/17 Hob: Fix the workaround to get image types
In reply to Dongxiao XuInherit image_types.bbclass before getting parameters to fix the original workaround.
Besides, kick the handler things off after Builder is initialized.
--- lib/bb/ui/crumbs/hobeventhandler.py | 8 ++++++-- lib/bb/ui/hob.py | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +6 -2
@@ -379,6 +379,11 @@ class HobHandler(gobject.GObject): self.build.reset() def get_parameters(self): + # inherit image_types.bbclass + self.init_cooker() + self.set_extra_inherit("image_types") + self.parse_config() + # retrieve the parameters from bitbake params = {} params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
@@ -444,8 +449,7 @@ class HobHandler(gobject.GObject): params["image_fstypes"] = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "" - # walkaround - params["image_types"] = " ".join(hcc.SUPPORTED_IMAGE_TYPES.keys()).lstrip(" ") + params["image_types"] = self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or "" params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or "" params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
lib/bb/ui/hob.py +2 -1
@@ -56,9 +56,10 @@ def main (server = None, eventHandler = None): package_model = PackageListModel() hobHandler = HobHandler(server, recipe_model, package_model) + builder = Builder(hobHandler, recipe_model, package_model) + if hobHandler.kick() == False: return 1 - builder = Builder(hobHandler, recipe_model, package_model) # This timeout function regularly probes the event queue to find out if we # have any messages waiting for us.
Signature · 1 line
1.7.4.1
PATCH 5/17 Hob: Change template button name from "Template" to "Templates"
In reply to Dongxiao XuChange the button name according to UI team's design.
This fixes [YOCTO #2126]
--- lib/bb/ui/crumbs/imageconfigurationpage.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/imageconfigurationpage.py +1 -1
@@ -46,7 +46,7 @@ class ImageConfigurationPage (HobPage): self.toolbar.set_style(gtk.TOOLBAR_BOTH) template_button = self.append_toolbar_button(self.toolbar, - "Template", + "Templates", hic.ICON_TEMPLATES_DISPLAY_FILE, hic.ICON_TEMPLATES_HOVER_FILE, "Load a hob building template saved before",
Signature · 1 line
1.7.4.1
PATCH 6/17 command.py: Change parseConfigurationFiles API from async to sync
In reply to Dongxiao XuparseConfigurationFiles will not cost much time and move it to the CommandSync class.
--- lib/bb/command.py | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
lib/bb/command.py +8 -9
@@ -186,6 +186,14 @@ class CommandsSync: event = params[0] bb.event.fire(eval(event), command.cooker.configuration.data) + def parseConfigurationFiles(self, command, params): + """ + Parse the configuration files + """ + prefiles = params[0] + postfiles = params[1] + command.cooker.parseConfigurationFiles(prefiles, postfiles) + class CommandsAsync: """ A class of asynchronous commands
@@ -350,12 +358,3 @@ class CommandsAsync: command.finishAsyncCommand() compareRevisions.needcache = True - def parseConfigurationFiles(self, command, params): - """ - Parse the configuration files - """ - prefiles = params[0] - postfiles = params[1] - command.cooker.parseConfigurationFiles(prefiles, postfiles) - command.finishAsyncCommand() - parseConfigurationFiles.needcache = False
Signature · 1 line
1.7.4.1
PATCH 7/17 process.py: Increase the timeout value for polling commands
In reply to Dongxiao XuThe parseConfigurationFiles commands needs more time for piping, thus change the polling timeout value from 0.5s to 1s.
--- lib/bb/server/process.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/server/process.py +1 -1
@@ -45,7 +45,7 @@ class ServerCommunicator(): while True: # don't let the user ctrl-c while we're waiting for a response try: - if self.connection.poll(.5): + if self.connection.poll(1): return self.connection.recv() else: return None
Signature · 1 line
1.7.4.1
PATCH 10/17 Hob: Change recipe selection tab order
In reply to Dongxiao XuIn the recipe screen, change the tab order to be:
"Included", "All recipes", and "Tasks".
Also change some description name in tab.
This fixes [YOCTO #2110]
--- lib/bb/ui/crumbs/recipeselectionpage.py | 48 +++++++++++++++--------------- 1 files changed, 24 insertions(+), 24 deletions(-)
lib/bb/ui/crumbs/recipeselectionpage.py +24 -24
@@ -33,26 +33,21 @@ from bb.ui.crumbs.hobpages import HobPage class RecipeSelectionPage (HobPage): pages = [ { - 'name' : 'Recipe', - 'filter' : { RecipeListModel.COL_TYPE : ['recipe'] }, + 'name' : 'Included', + 'filter' : { RecipeListModel.COL_INC : [True], + RecipeListModel.COL_TYPE : ['recipe', 'task'] }, 'columns' : [{ - 'col_name' : 'Recipe', + 'col_name' : 'Recipe Name', 'col_id' : RecipeListModel.COL_NAME, 'col_style': 'text', 'col_min' : 100, 'col_max' : 400 }, { - 'col_name' : 'License', - 'col_id' : RecipeListModel.COL_LIC, - 'col_style': 'text', - 'col_min' : 100, - 'col_max' : 400 - }, { - 'col_name' : 'Group', - 'col_id' : RecipeListModel.COL_GROUP, + 'col_name' : 'Brought in by', + 'col_id' : RecipeListModel.COL_BINB, 'col_style': 'text', 'col_min' : 100, - 'col_max' : 400 + 'col_max' : 500 }, { 'col_name' : 'Included', 'col_id' : RecipeListModel.COL_INC,
@@ -61,17 +56,23 @@ class RecipeSelectionPage (HobPage): 'col_max' : 50 }] }, { - 'name' : 'Recipe Collection', - 'filter' : { RecipeListModel.COL_TYPE : ['task'] }, + 'name' : 'All recipes', + 'filter' : { RecipeListModel.COL_TYPE : ['recipe'] }, 'columns' : [{ - 'col_name' : 'Recipe Collection', + 'col_name' : 'Recipe Name', 'col_id' : RecipeListModel.COL_NAME, 'col_style': 'text', 'col_min' : 100, 'col_max' : 400 }, { - 'col_name' : 'Description', - 'col_id' : RecipeListModel.COL_DESC, + 'col_name' : 'License', + 'col_id' : RecipeListModel.COL_LIC, + 'col_style': 'text', + 'col_min' : 100, + 'col_max' : 400 + }, { + 'col_name' : 'Group', + 'col_id' : RecipeListModel.COL_GROUP, 'col_style': 'text', 'col_min' : 100, 'col_max' : 400
@@ -83,21 +84,20 @@ class RecipeSelectionPage (HobPage): 'col_max' : 50 }] }, { - 'name' : 'Included', - 'filter' : { RecipeListModel.COL_INC : [True], - RecipeListModel.COL_TYPE : ['recipe', 'task'] }, + 'name' : 'Tasks', + 'filter' : { RecipeListModel.COL_TYPE : ['task'] }, 'columns' : [{ - 'col_name' : 'Recipe', + 'col_name' : 'Task Name', 'col_id' : RecipeListModel.COL_NAME, 'col_style': 'text', 'col_min' : 100, 'col_max' : 400 }, { - 'col_name' : 'Brought by', - 'col_id' : RecipeListModel.COL_BINB, + 'col_name' : 'Description', + 'col_id' : RecipeListModel.COL_DESC, 'col_style': 'text', 'col_min' : 100, - 'col_max' : 500 + 'col_max' : 400 }, { 'col_name' : 'Included', 'col_id' : RecipeListModel.COL_INC,
Signature · 1 line
1.7.4.1
PATCH 12/17 Hob: Move "Create your own image" to the bottom of image list
In reply to Dongxiao XuMove "Create your own image" item to the bottom of base image list. Besides, remove an un-used hob list entry.
This fixes [YOCTO #2104]
--- lib/bb/ui/crumbs/hoblistmodel.py | 3 +-- lib/bb/ui/crumbs/imageconfigurationpage.py | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-)
lib/bb/ui/crumbs/hoblistmodel.py +1 -2
@@ -412,7 +412,7 @@ class RecipeListModel(gtk.ListStore): """ (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11) - __dummy_image__ = "Start from scratch" + __dummy_image__ = "Create your own image" __gsignals__ = { "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
@@ -434,7 +434,6 @@ class RecipeListModel(gtk.ListStore): gobject.TYPE_BOOLEAN, gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, - gobject.TYPE_STRING, gobject.TYPE_STRING) """
lib/bb/ui/crumbs/imageconfigurationpage.py +4 -1
@@ -330,12 +330,15 @@ class ImageConfigurationPage (HobPage): # append and set active while it: path = image_model.get_path(it) + it = image_model.iter_next(it) image_name = image_model[path][recipe_model.COL_NAME] + if image_name == self.builder.recipe_model.__dummy_image__: + continue self.image_combo.append_text(image_name) if image_name == selected_image: active = cnt - it = image_model.iter_next(it) cnt = cnt + 1 + self.image_combo.append_text(self.builder.recipe_model.__dummy_image__) self._image_combo_connect_signal() self.image_combo.set_active(-1)
Signature · 1 line
1.7.4.1
PATCH 11/17 Hob: Change package selection tab order
In reply to Dongxiao XuIn the package screen, change the tab order to be:
"Included" and "All packages".
Also change some descriptions in tab.
This fixes [YOCTO #2111]
--- lib/bb/ui/crumbs/packageselectionpage.py | 40 +++++++++++++++--------------- 1 files changed, 20 insertions(+), 20 deletions(-)
lib/bb/ui/crumbs/packageselectionpage.py +20 -20
@@ -34,55 +34,55 @@ class PackageSelectionPage (HobPage): pages = [ { - 'name' : 'All packages', - 'filter' : {}, + 'name' : 'Included', + 'filter' : { PackageListModel.COL_INC : [True] }, 'columns' : [{ - 'col_name' : 'Name', + 'col_name' : 'Package Name', 'col_id' : PackageListModel.COL_NAME, 'col_style': 'text', 'col_min' : 100, - 'col_max' : 400 + 'col_max' : 300 }, { - 'col_name' : 'size', + 'col_name' : 'Brought in by', + 'col_id' : PackageListModel.COL_BINB, + 'col_style': 'text', + 'col_min' : 100, + 'col_max' : 350 + }, { + 'col_name' : 'Size', 'col_id' : PackageListModel.COL_SIZE, 'col_style': 'text', 'col_min' : 100, - 'col_max' : 500 + 'col_max' : 300 }, { 'col_name' : 'Included', 'col_id' : PackageListModel.COL_INC, 'col_style': 'check toggle', 'col_min' : 50, 'col_max' : 50 - }] + }] }, { - 'name' : 'Included', - 'filter' : { PackageListModel.COL_INC : [True] }, + 'name' : 'All packages', + 'filter' : {}, 'columns' : [{ - 'col_name' : 'Name', + 'col_name' : 'Package Name', 'col_id' : PackageListModel.COL_NAME, 'col_style': 'text', 'col_min' : 100, - 'col_max' : 300 - }, { - 'col_name' : 'Brought by', - 'col_id' : PackageListModel.COL_BINB, - 'col_style': 'text', - 'col_min' : 100, - 'col_max' : 350 + 'col_max' : 400 }, { - 'col_name' : 'size', + 'col_name' : 'Size', 'col_id' : PackageListModel.COL_SIZE, 'col_style': 'text', 'col_min' : 100, - 'col_max' : 300 + 'col_max' : 500 }, { 'col_name' : 'Included', 'col_id' : PackageListModel.COL_INC, 'col_style': 'check toggle', 'col_min' : 50, 'col_max' : 50 - }] + }] } ]
Signature · 1 line
1.7.4.1
PATCH 13/17 Hob: Change window title from HOB to Hob
In reply to Dongxiao XuFrom: Shane Wang <[email protected]>
[Yocto #2147]
--- lib/bb/ui/crumbs/builder.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/builder.py +1 -1
@@ -227,7 +227,7 @@ class Builder(gtk.Window): self.switch_page(self.MACHINE_SELECTION) def create_visual_elements(self): - self.set_title("Hob - Image Creator") + self.set_title("Hob") self.set_icon_name("applications-development") self.set_resizable(True) window_width = self.get_screen().get_width()
Signature · 1 line
1.7.4.1
PATCH 14/17 Hob: Change "View Packages" description
In reply to Dongxiao XuFrom: Shane Wang <[email protected]>
Change 'View Packages' button description from 'Add/remove packages' to 'Add/remove previously built packages to/from your image'. And we adjust the size to make "View Packages" button fit into the window.
[Yocto #2146]
--- lib/bb/ui/crumbs/imageconfigurationpage.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
lib/bb/ui/crumbs/imageconfigurationpage.py +3 -3
@@ -200,7 +200,7 @@ class ImageConfigurationPage (HobPage): icon_file = hic.ICON_PACKAGES_DISPLAY_FILE hover_file = hic.ICON_PACKAGES_HOVER_FILE self.view_packages_button = HobXpmLabelButtonBox(icon_file, hover_file, - "View Packages", "Add/remove packages") + "View Packages", "Add/remove previously built packages to/from your image") self.view_packages_button.connect("button-release-event", self.view_packages_button_clicked_cb) self.image_separator = gtk.HSeparator()
@@ -213,8 +213,8 @@ class ImageConfigurationPage (HobPage): self.gtable.attach(self.image_separator, 0, 40, 35, 36) def set_rcppkg_layout(self): - self.gtable.attach(self.view_recipes_button, 0, 20, 28, 32) - self.gtable.attach(self.view_packages_button, 20, 40, 28, 32) + self.gtable.attach(self.view_recipes_button, 0, 18, 28, 32) + self.gtable.attach(self.view_packages_button, 18, 40, 28, 32) def create_config_build_button(self): # Create the "Build packages" and "Just bake" buttons at the bottom
Signature · 1 line
1.7.4.1
PATCH 15/17 Hob: Change the titles for recipe view and package view
In reply to Dongxiao XuFrom: Shane Wang <[email protected]>
--- lib/bb/ui/crumbs/packageselectionpage.py | 2 +- lib/bb/ui/crumbs/recipeselectionpage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
lib/bb/ui/crumbs/packageselectionpage.py +1 -1
@@ -87,7 +87,7 @@ class PackageSelectionPage (HobPage): ] def __init__(self, builder): - super(PackageSelectionPage, self).__init__(builder, "Package Selection") + super(PackageSelectionPage, self).__init__(builder, "Packages") # set invisiable members self.package_model = self.builder.package_model
lib/bb/ui/crumbs/recipeselectionpage.py +1 -1
@@ -109,7 +109,7 @@ class RecipeSelectionPage (HobPage): ] def __init__(self, builder = None): - super(RecipeSelectionPage, self).__init__(builder, "Recipe Selection") + super(RecipeSelectionPage, self).__init__(builder, "Recipes") # set invisiable members self.recipe_model = self.builder.recipe_model
Signature · 1 line
1.7.4.1
PATCH 16/17 cooker: add inherit information when generating package tree
In reply to Dongxiao XuInherit information could be used to judge if a recipe is image type or not.
--- lib/bb/cooker.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
lib/bb/cooker.py +2 -0
@@ -471,6 +471,7 @@ class BBCooker: description = self.status.description[fn] rdepends = self.status.rundeps[fn] rrecs = self.status.runrecs[fn] + inherits = self.status.inherits.get(fn, None) if pn not in depend_tree["pn"]: depend_tree["pn"][pn] = {} depend_tree["pn"][pn]["filename"] = fn
@@ -479,6 +480,7 @@ class BBCooker: depend_tree["pn"][pn]["license"] = lic depend_tree["pn"][pn]["section"] = section depend_tree["pn"][pn]["description"] = description + depend_tree["pn"][pn]["inherits"] = inherits if fnid not in seen_fnids: seen_fnids.append(fnid)
Signature · 1 line
1.7.4.1
PATCH 17/17 Hob: Use inherit information to judge if a recipe is image type
In reply to Dongxiao XuPreviously we use pattern "-image-" to match recipe name to judge if it is image type. This will ignore some images whose name doesn't match the pattern. The new method is to use the inherit information, that is, if a recipe inherits image.bbclass, we treat it as an image.
--- lib/bb/ui/crumbs/hoblistmodel.py | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
lib/bb/ui/crumbs/hoblistmodel.py +5 -3
@@ -528,6 +528,7 @@ class RecipeListModel(gtk.ListStore): desc = event_model["pn"][item]["description"] lic = event_model["pn"][item]["license"] group = event_model["pn"][item]["section"] + inherits = event_model["pn"][item]["inherits"] install = [] depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
@@ -537,9 +538,10 @@ class RecipeListModel(gtk.ListStore): atype = 'mltask' else: atype = 'task' - elif ('-image-' in name): - atype = 'image' - install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, []) + elif ('image.bbclass' in " ".join(inherits)): + if name != "hob-image": + atype = 'image' + install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, []) elif ('meta-' in name): atype = 'toolchain' elif (name == 'dummy-image' or name == 'dummy-toolchain'):
Signature · 1 line
1.7.4.1
Quoted 15 lines · Dongxiao Xu
Hi Richard,
This pull request is Hob related bug fixes. Please help to review and pull.
Thanks,
DongxiaoThe following changes since commit
d595960fea0988df9004d927bc2ec3439540dd9c:Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)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 6 lines
Dongxiao Xu (14):
Hob: Still use initcmd != None as the if judgement
Hob: Remove split model in GTK Hob
cooker: terminate each process when quitting recipe parsing
Hob: change package classes selection GUI
Hob: Change template button name from "Template" to "Templates"
These all look fine.
Quoted 3 lines
command.py: Change parseConfigurationFiles API from async to syncprocess.py: Increase the timeout value for polling commands
Hob: Change parseConfigurationFiles API usage
Can you explain some of the reasoning behind this set of changes? If the command truly belongs as an asynchronous one I'm not sure why we need to increase the timeout duration specifically for it.
Quoted 11 lines
Hob: Fix the workaround to get image types
Hob: Change recipe selection tab order
Hob: Change package selection tab order
Hob: Move "Create your own image" to the bottom of image list
cooker: add inherit information when generating package tree
Hob: Use inherit information to judge if a recipe is image typeShane Wang (3):
Hob: Change window title from HOB to Hob
Hob: Change "View Packages" description
Hob: Change the titles for recipe view and package view
These also look OK to me.
Cheers,
Joshua
Signature · 3 lines
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology CentreQuoted 26 lines · Joshua Lock
Quoted 15 lines · Dongxiao Xu
Hi Richard,
This pull request is Hob related bug fixes. Please help to review and pull.
Thanks,
DongxiaoThe following changes since commit
d595960fea0988df9004d927bc2ec3439540dd9c:Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)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-bugfixQuoted 6 lines
Dongxiao Xu (14):
Hob: Still use initcmd != None as the if judgement
Hob: Remove split model in GTK Hob
cooker: terminate each process when quitting recipe parsing
Hob: change package classes selection GUI
Hob: Change template button name from "Template" to "Templates"These all look fine.
Quoted 9 lines
Quoted 3 lines
command.py: Change parseConfigurationFiles API from async to syncprocess.py: Increase the timeout value for polling commands
Hob: Change parseConfigurationFiles API usageCan you explain some of the reasoning behind this set of changes? If the command truly belongs as an asynchronous one I'm not sure why we need to increase the timeout duration specifically for it.
Quoted 1 line
Hob: Fix the workaround to get image types
Hi Josh,
Actually the above three patches are preparations for this commit: "Hob:
Fix the workaround to get image types".
The background is that, we need to add extra inherits of image_types.bbclass before parsing configuration files and getting variables values. Therefore the modified code piece is something like:
def get_parameters(self):
self.init_cooker()
self.set_extra_inherits("image_types")
self.parse_config()
self.server.runCommand(["getVariable", "MACHINE"])
...We can see from above code is that, the parse_config locates between two SYNC commands (set_extra_inherits and getVariable). Therefore we also need the parse_config to be a SYNC command.
As far as I know the parseConfigurationFiles API doesn't cost too much time (should less than 1s), so that's the reason why I change it to SYNC mode.
The increase of time duration for parseConfigurationFiles is that, the process server use pipe mode to pass object (function) from one to another. The original 0.5 second timeout isn't enough for transferring "parseConfigurationFiles" object, the phenomenon is that on certain machines, the runCommand result is messed up with wrong values. This issue doesn't exist with xmlrpc server.
Thanks,
Dongxiao
Quoted 15 lines
Quoted 10 lines
Hob: Change recipe selection tab order
Hob: Change package selection tab order
Hob: Move "Create your own image" to the bottom of image list
cooker: add inherit information when generating package tree
Hob: Use inherit information to judge if a recipe is image typeShane Wang (3):
Hob: Change window title from HOB to Hob
Hob: Change "View Packages" description
Hob: Change the titles for recipe view and package viewThese also look OK to me.
Cheers,
Joshua
Quoted 62 lines · Dongxiao
Quoted 26 lines · Joshua Lock
Quoted 15 lines · Dongxiao Xu
Hi Richard,
This pull request is Hob related bug fixes. Please help to review and pull.
Thanks,
DongxiaoThe following changes since commit
d595960fea0988df9004d927bc2ec3439540dd9c:Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)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-bugfixQuoted 6 lines
Dongxiao Xu (14):
Hob: Still use initcmd != None as the if judgement
Hob: Remove split model in GTK Hob
cooker: terminate each process when quitting recipe parsing
Hob: change package classes selection GUI
Hob: Change template button name from "Template" to "Templates"These all look fine.
Quoted 9 lines
Quoted 3 lines
command.py: Change parseConfigurationFiles API from async to syncprocess.py: Increase the timeout value for polling commands
Hob: Change parseConfigurationFiles API usageCan you explain some of the reasoning behind this set of changes? If the command truly belongs as an asynchronous one I'm not sure why we need to increase the timeout duration specifically for it.
Quoted 1 line
Hob: Fix the workaround to get image types
Hi Josh,
Actually the above three patches are preparations for this commit: "Hob:
Fix the workaround to get image types".The background is that, we need to add extra inherits of image_types.bbclass before parsing configuration files and getting variables values. Therefore the modified code piece is something like:
def
get_parameters(self):self.init_cooker() self.set_extra_inherits("image_types") self.parse_config() self.server.runCommand(["getVariable", "MACHINE"]) ...We can see from above code is that, the
parse_configlocates between two SYNC commands (set_extra_inheritsand getVariable). Therefore we also need theparse_configto be a SYNC command.As far as I know the parseConfigurationFiles API doesn't cost too much time (should less than 1s), so that's the reason why I change it to SYNC mode.
Quoted 6 lines
The increase of time duration for parseConfigurationFiles is that, the process server use pipe mode to pass object (function) from one to another. The original 0.5 second timeout isn't enough for transferring "parseConfigurationFiles" object, the phenomenon is that on certain machines, the runCommand result is messed up with wrong values. This issue doesn't exist with xmlrpc server.
OK, I understand what you're trying to achieve. I'm afraid I'm not convinced that we need to make such an invasive change though. Any reason we can't re-order the initialisation so that everything is done after the async parseConfigurationFiles?
I'm nervous of us pushing the 0.5s->1s change this late in the cycle. Have you any indication of whether it affects builds using knotty?
Just to be clear I think Richard needs to ack/nack this change to core BitBake. The Hob changes related to it are fine by me.
Cheers,
Joshua
Signature · 3 lines
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology CentreQuoted 75 lines · Joshua Lock
Quoted 62 lines · Dongxiao
Quoted 26 lines · Joshua Lock
Quoted 15 lines · Dongxiao Xu
Hi Richard,
This pull request is Hob related bug fixes. Please help to review and pull.
Thanks,
DongxiaoThe following changes since commit
d595960fea0988df9004d927bc2ec3439540dd9c:Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)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-bugfixQuoted 6 lines
Dongxiao Xu (14):
Hob: Still use initcmd != None as the if judgement
Hob: Remove split model in GTK Hob
cooker: terminate each process when quitting recipe parsing
Hob: change package classes selection GUI
Hob: Change template button name from "Template" to "Templates"These all look fine.
Quoted 9 lines
Quoted 3 lines
command.py: Change parseConfigurationFiles API from async to syncprocess.py: Increase the timeout value for polling commands
Hob: Change parseConfigurationFiles API usageCan you explain some of the reasoning behind this set of changes? If the command truly belongs as an asynchronous one I'm not sure why we need to increase the timeout duration specifically for it.
Quoted 1 line
Hob: Fix the workaround to get image types
Hi Josh,
Actually the above three patches are preparations for this commit: "Hob:
Fix the workaround to get image types".The background is that, we need to add extra inherits of image_types.bbclass before parsing configuration files and getting variables values. Therefore the modified code piece is something like:
def
get_parameters(self):self.init_cooker() self.set_extra_inherits("image_types") self.parse_config() self.server.runCommand(["getVariable", "MACHINE"]) ...We can see from above code is that, the
parse_configlocates between two SYNC commands (set_extra_inheritsand getVariable). Therefore we also need theparse_configto be a SYNC command.As far as I know the parseConfigurationFiles API doesn't cost too much time (should less than 1s), so that's the reason why I change it to SYNC mode.
Quoted 6 lines
The increase of time duration for parseConfigurationFiles is that, the process server use pipe mode to pass object (function) from one to another. The original 0.5 second timeout isn't enough for transferring "parseConfigurationFiles" object, the phenomenon is that on certain machines, the runCommand result is messed up with wrong values. This issue doesn't exist with xmlrpc server.
OK, I understand what you're trying to achieve. I'm afraid I'm not convinced that we need to make such an invasive change though. Any reason we can't re-order the initialisation so that everything is done after the async parseConfigurationFiles?
Quoted 5 lines
I'm nervous of us pushing the 0.5s->1s change this late in the cycle. Have you any indication of whether it affects builds using knotty?
Just to be clear I think Richard needs to ack/nack this change to core BitBake. The Hob changes related to it are fine by me.
Having a sync command blocking the system for over 1 second isn't right. Sync commands are meant to be fast (say 0.01s max) and this obviously isn't.
I'm rather concerned about this and it suggests something is wrong with hob's init/state code to be honest.
My suggestion would be to add an extra parameter to self.parse_config() so you can set other classes to inherit (and variables to set). You will still have to then read MACHINE later but I think that is reasonable.
Cheers,
Richard
Quoted 82 lines · Richard Purdie
Quoted 75 lines · Joshua Lock
Quoted 62 lines · Dongxiao
Quoted 26 lines · Joshua Lock
Quoted 15 lines · Dongxiao Xu
Hi Richard,
This pull request is Hob related bug fixes. Please help to review and pull.
Thanks,
DongxiaoThe following changes since commit
d595960fea0988df9004d927bc2ec3439540dd9c:Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)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-bugfixQuoted 6 lines
Dongxiao Xu (14):
Hob: Still use initcmd != None as the if judgement
Hob: Remove split model in GTK Hob
cooker: terminate each process when quitting recipe parsing
Hob: change package classes selection GUI
Hob: Change template button name from "Template" to "Templates"These all look fine.
Quoted 9 lines
Quoted 3 lines
command.py: Change parseConfigurationFiles API from async to syncprocess.py: Increase the timeout value for polling commands
Hob: Change parseConfigurationFiles API usageCan you explain some of the reasoning behind this set of changes? If the command truly belongs as an asynchronous one I'm not sure why we need to increase the timeout duration specifically for it.
Quoted 1 line
Hob: Fix the workaround to get image types
Hi Josh,
Actually the above three patches are preparations for this commit: "Hob:
Fix the workaround to get image types".The background is that, we need to add extra inherits of image_types.bbclass before parsing configuration files and getting variables values. Therefore the modified code piece is something like:
def
get_parameters(self):self.init_cooker() self.set_extra_inherits("image_types") self.parse_config() self.server.runCommand(["getVariable", "MACHINE"]) ...We can see from above code is that, the
parse_configlocates between two SYNC commands (set_extra_inheritsand getVariable). Therefore we also need theparse_configto be a SYNC command.As far as I know the parseConfigurationFiles API doesn't cost too much time (should less than 1s), so that's the reason why I change it to SYNC mode.
Quoted 6 lines
The increase of time duration for parseConfigurationFiles is that, the process server use pipe mode to pass object (function) from one to another. The original 0.5 second timeout isn't enough for transferring "parseConfigurationFiles" object, the phenomenon is that on certain machines, the runCommand result is messed up with wrong values. This issue doesn't exist with xmlrpc server.
OK, I understand what you're trying to achieve. I'm afraid I'm not convinced that we need to make such an invasive change though. Any reason we can't re-order the initialisation so that everything is done after the async parseConfigurationFiles?
Quoted 5 lines
I'm nervous of us pushing the 0.5s->1s change this late in the cycle. Have you any indication of whether it affects builds using knotty?
Just to be clear I think Richard needs to ack/nack this change to core BitBake. The Hob changes related to it are fine by me.
Quoted 6 lines
Having a sync command blocking the system for over 1 second isn't right. Sync commands are meant to be fast (say 0.01s max) and this obviously isn't.
I'm rather concerned about this and it suggests something is wrong with hob's init/state code to be honest.
The above case is not in current Hob code, I added it only after I change parseConfigurationFiles to SYNC mode. There is no problem with current Hob's init code.
Quoted 4 lines
My suggestion would be to add an extra parameter to
self.parse_config()so you can set other classes to inherit (and variables to set). You will still have to then read MACHINE later but I think that is reasonable.
I will try to implement it in ASYNC mode.
Thanks,
Dongxiao
Quoted 7 lines
Cheers,
Richard