Hob: Bug fixes
Hi Richard,
This is the hob related bug fixes, please help to review and pull.
This version contains 5 commits that have been sent last time with no comments, and remove the two commits that Josh commented on. Also there are another 5 commits for other bug fixes.
For the two patches that we are discussing, I didn't add them in this series. I will send a separate pull request for it after the decision is finalized.
Thanks,
Dongxiao
The following changes since commit 035e146ff92236a3eda71ad71e8389737f91753b:
Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build (2012-03-30 17:19:35 +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 (10):
Hob: Fix MACHINE setting
Hob: Update the cache when setting changed
Hob: Remove some calling of initiate_new_build()
Hob: Remove duplication for certain bitbake variables
Hob: Set stop button sensitive after task started
Hob: Remove the recipe/task type for multilib
Hob: Fix toolchain build
Hob: Check "dummy" image while update_image_combo
Hob: Change base image to "Create your own image" if customized
Hob: fix IMAGE_INSTALL setting while save template
lib/bb/ui/crumbs/builddetailspage.py | 2 + lib/bb/ui/crumbs/builder.py | 22 ++++++++++---- lib/bb/ui/crumbs/hobeventhandler.py | 31 ++++++++++++-------- lib/bb/ui/crumbs/hoblistmodel.py | 43 ++++++++++++++++++++++----- lib/bb/ui/crumbs/imageconfigurationpage.py | 10 ++++++- lib/bb/ui/crumbs/imagedetailspage.py | 2 - lib/bb/ui/crumbs/packageselectionpage.py | 7 ++++ lib/bb/ui/crumbs/recipeselectionpage.py | 5 +++ 8 files changed, 92 insertions(+), 30 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/10 Hob: Fix MACHINE setting
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.
--- 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
@@ -519,7 +519,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)
@@ -868,7 +868,7 @@ class Builder(gtk.Window): def reparse_post_adv_settings(self): # DO reparse recipes - 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
@@ -256,7 +256,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 2/10 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
@@ -869,7 +869,7 @@ class Builder(gtk.Window): def reparse_post_adv_settings(self): # DO reparse recipes 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)
Signature · 1 line
1.7.4.1
PATCH 3/10 Hob: Remove some calling of initiate_new_build()
In reply to Dongxiao Xuinitiate_new_build() function is in async mode and could not be called before another async function.
Also we could not initialize the build if user simply change a setting, therefore remove this function.
--- lib/bb/ui/crumbs/imagedetailspage.py | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
lib/bb/ui/crumbs/imagedetailspage.py +0 -2
@@ -403,7 +403,6 @@ class ImageDetailsPage (HobPage): response, path = self.builder.show_load_template_dialog() if not response: return - self.builder.initiate_new_build() if path: self.builder.load_template(path)
@@ -415,6 +414,5 @@ class ImageDetailsPage (HobPage): response, settings_changed = self.builder.show_adv_settings_dialog() if not response: return - self.builder.initiate_new_build() if settings_changed: self.builder.reparse_post_adv_settings()
Signature · 1 line
1.7.4.1
PATCH 4/10 Hob: Remove duplication for certain bitbake variables
In reply to Dongxiao XuSometimes, certain variables have duplicated values inside, for example, IMAGE_FSTYPES = "tar.bz2 ext3 tar.bz2 ext3"
We need to remove the redundancy for those values.
--- lib/bb/ui/crumbs/hobeventhandler.py | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +13 -6
@@ -382,6 +382,13 @@ class HobHandler(gobject.GObject): def reset_build(self): self.build.reset() + def _remove_redundant(self, string): + ret = [] + for i in string.split(): + if i not in ret: + ret.append(i) + return " ".join(ret) + def get_parameters(self): # retrieve the parameters from bitbake params = {}
@@ -445,19 +452,19 @@ class HobHandler(gobject.GObject): image_overhead_factor = float(image_overhead_factor) params['image_overhead_factor'] = image_overhead_factor - params["incompat_license"] = self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "" + params["incompat_license"] = self._remove_redundant(self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "") params["sdk_machine"] = self.server.runCommand(["getVariable", "SDKMACHINE"]) or self.server.runCommand(["getVariable", "SDK_ARCH"]) or "" - params["image_fstypes"] = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "" + params["image_fstypes"] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "") - params["image_types"] = self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or "" + params["image_types"] = self._remove_redundant(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 "" - params["runnable_image_types"] = self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "" - params["runnable_machine_patterns"] = self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "" - params["deployable_image_types"] = self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "" + params["runnable_image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "") + params["runnable_machine_patterns"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "") + params["deployable_image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "") params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or "" params["distro_version"] = self.server.runCommand(["getVariable", "DISTRO_VERSION"]) or "" params["target_os"] = self.server.runCommand(["getVariable", "TARGET_OS"]) or ""
Signature · 1 line
1.7.4.1
PATCH 6/10 Hob: Remove the recipe/task type for multilib
In reply to Dongxiao XuWe will not display multilib recipes and tasks in separate tabs, therefore remove the specific types.
--- lib/bb/ui/crumbs/hoblistmodel.py | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-)
lib/bb/ui/crumbs/hoblistmodel.py +2 -8
@@ -530,10 +530,7 @@ class RecipeListModel(gtk.ListStore): depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, []) if ('task-' in name): - if ('lib32-' in name or 'lib64-' in name): - atype = 'mltask' - else: - atype = 'task' + atype = 'task' elif ('image.bbclass' in " ".join(inherits)): if name != "hob-image": atype = 'image'
@@ -543,10 +540,7 @@ class RecipeListModel(gtk.ListStore): elif (name == 'dummy-image' or name == 'dummy-toolchain'): atype = 'dummy' else: - if ('lib32-' in name or 'lib64-' in name): - atype = 'mlrecipe' - else: - atype = 'recipe' + atype = 'recipe' self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc, self.COL_LIC, lic, self.COL_GROUP, group,
Signature · 1 line
1.7.4.1
PATCH 5/10 Hob: Set stop button sensitive after task started
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/builddetailspage.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
lib/bb/ui/crumbs/builddetailspage.py +2 -0
@@ -133,6 +133,7 @@ class BuildDetailsPage (HobPage): self.progress_hbox.pack_start(self.progress_bar, expand=True, fill=True) self.stop_button = HobAltButton("Stop") self.stop_button.connect("clicked", self.stop_button_clicked_cb) + self.stop_button.set_sensitive(False) self.progress_hbox.pack_end(self.stop_button, expand=False, fill=False) self.notebook = HobNotebook()
@@ -169,6 +170,7 @@ class BuildDetailsPage (HobPage): recipe = os.path.basename(recipe_path).rstrip(".bb") tsk_msg = "<b>Running task %s of %s:</b> %s\n<b>Recipe:</b> %s" % (current, total, recipe_task, recipe) self.task_status.set_markup(tsk_msg) + self.stop_button.set_sensitive(True) def reset_build_status(self): self.task_status.set_markup("\n") # to ensure layout is correct
Signature · 1 line
1.7.4.1
PATCH 7/10 Hob: Fix toolchain build
In reply to Dongxiao XuOriginally we added -dev and -dbg postfixes to our selected packages as toolchain packages. However, some package names are modified in recipes, so we could not rely on its base name. The new approach is to detect if a package is selected, then include those packages under the same recipe endswith "-dev" and "-dbg".
This fixes [YOCTO #2185]
--- lib/bb/ui/crumbs/builder.py | 9 ++++++--- lib/bb/ui/crumbs/hobeventhandler.py | 9 ++++----- lib/bb/ui/crumbs/hoblistmodel.py | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-)
lib/bb/ui/crumbs/builder.py +6 -3
@@ -457,12 +457,15 @@ class Builder(gtk.Window): def generate_image(self): # Build image self.set_user_config() - all_packages = self.package_model.get_selected_packages() + packages = self.package_model.get_selected_packages() + toolchain_packages = [] + if self.configuration.toolchain_build: + toolchain_packages = self.package_model.get_selected_packages_toolchain() self.handler.reset_build() - self.handler.generate_image(all_packages, + self.handler.generate_image(packages, self.hob_image, self.hob_toolchain, - self.configuration.toolchain_build) + toolchain_packages) # Callback Functions def handler_config_updated_cb(self, handler, which, values):
lib/bb/ui/crumbs/hobeventhandler.py +4 -5
@@ -131,9 +131,8 @@ class HobHandler(gobject.GObject): 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)]) + if self.toolchain_packages: + self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)]) targets.append(self.hob_toolchain) self.server.runCommand(["buildTargets", targets, "build"])
@@ -350,11 +349,11 @@ class HobHandler(gobject.GObject): self.commands_async.append(self.SUB_BUILD_RECIPES) self.run_next_command(self.GENERATE_PACKAGES) - def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_build=False): + def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_packages=[]): self.package_queue = tgts self.hob_image = hob_image self.hob_toolchain = hob_toolchain - self.toolchain_build = toolchain_build + self.toolchain_packages = toolchain_packages self.commands_async.append(self.SUB_PARSE_CONFIG) self.commands_async.append(self.SUB_BUILD_IMAGE) self.run_next_command(self.GENERATE_IMAGE)
lib/bb/ui/crumbs/hoblistmodel.py +16 -0
@@ -357,6 +357,22 @@ class PackageListModel(gtk.TreeStore): return packagelist + def get_selected_packages_toolchain(self): + packagelist = [] + + it = self.get_iter_first() + while it: + if self.get_value(it, self.COL_INC): + child_it = self.iter_children(it) + while child_it: + name = self.get_value(child_it, self.COL_NAME) + inc = self.get_value(child_it, self.COL_INC) + if inc or name.endswith("-dev") or name.endswith("-dbg"): + packagelist.append(name) + child_it = self.iter_next(child_it) + it = self.iter_next(it) + + return packagelist """ Return the selected package size, unit is KB. """
Signature · 1 line
1.7.4.1
PATCH 9/10 Hob: Change base image to "Create your own image" if customized
In reply to Dongxiao XuOnce user did customization to his base image, we change the base image to be "Create your own image" to avoid some issues caused by the relationship between base image and its default recipes and packages.
This fixes [YOCTO #2211]
--- lib/bb/ui/crumbs/builder.py | 3 +++ lib/bb/ui/crumbs/imageconfigurationpage.py | 2 ++ lib/bb/ui/crumbs/packageselectionpage.py | 6 ++++++ lib/bb/ui/crumbs/recipeselectionpage.py | 5 +++++ 4 files changed, 16 insertions(+), 0 deletions(-)
lib/bb/ui/crumbs/builder.py +3 -0
@@ -258,6 +258,9 @@ class Builder(gtk.Window): self.recipe_model = recipe_model self.package_model = package_model + # Indicate whether user has customized the image + self.customized = False + # create visual elements self.create_visual_elements()
lib/bb/ui/crumbs/imageconfigurationpage.py +2 -0
@@ -289,6 +289,8 @@ class ImageConfigurationPage (HobPage): if not selected_image: return + self.builder.customized = False + selected_recipes = [] image_path = self.builder.recipe_model.pn_path[selected_image]
lib/bb/ui/crumbs/packageselectionpage.py +6 -0
@@ -90,6 +90,7 @@ class PackageSelectionPage (HobPage): super(PackageSelectionPage, self).__init__(builder, "Packages") # set invisiable members + self.recipe_model = self.builder.recipe_model self.package_model = self.builder.package_model # create visual elements
@@ -193,6 +194,11 @@ class PackageSelectionPage (HobPage): self.package_model.exclude_item(item_path=path) self.refresh_selection() + if not self.builder.customized: + self.builder.customized = True + self.builder.configuration.selected_image = self.recipe_model.__dummy_image__ + self.builder.rcppkglist_populated() + self.builder.window_sensitive(True) def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
lib/bb/ui/crumbs/recipeselectionpage.py +5 -0
@@ -187,6 +187,11 @@ class RecipeSelectionPage (HobPage): self.recipe_model.exclude_item(item_path=path) self.refresh_selection() + if not self.builder.customized: + self.builder.customized = True + self.builder.configuration.selected_image = self.recipe_model.__dummy_image__ + self.builder.rcppkglist_populated() + self.builder.window_sensitive(True) def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
Signature · 1 line
1.7.4.1
PATCH 8/10 Hob: Check "dummy" image while update_image_combo
In reply to Dongxiao XuWe also need to check if the selected image is "Create your own image" and set it as active.
Besides, to avoid the impact of set_active(), we need to move the connect signal in the end of the update_image_combo() function.
--- lib/bb/ui/crumbs/imageconfigurationpage.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/imageconfigurationpage.py +7 -1
@@ -338,11 +338,17 @@ class ImageConfigurationPage (HobPage): active = cnt cnt = cnt + 1 self.image_combo.append_text(self.builder.recipe_model.__dummy_image__) - self._image_combo_connect_signal() + if selected_image == self.builder.recipe_model.__dummy_image__: + active = cnt self.image_combo.set_active(-1) self.image_combo.set_active(active) + if active != -1: + self.show_baseimg_selected() + + self._image_combo_connect_signal() + def layer_button_clicked_cb(self, button): # Create a layer selection dialog self.builder.show_layer_selection_dialog()
Signature · 1 line
1.7.4.1
PATCH 10/10 Hob: fix IMAGE_INSTALL setting while save template
In reply to Dongxiao XuIf save every selected package into IMAGE_INSTALL field, and then build the saved bb file by bitbake command line, it will report errors since some packages could not be found since they are dynamically generated. With this commit, Hob will only save those packages into the IMAGE_INSTALL variable which are brought in by user.
--- lib/bb/ui/crumbs/builder.py | 4 +++- lib/bb/ui/crumbs/hoblistmodel.py | 17 +++++++++++++++++ lib/bb/ui/crumbs/packageselectionpage.py | 1 + 3 files changed, 21 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/builder.py +3 -1
@@ -68,6 +68,8 @@ class Configuration: self.selected_recipes = [] self.selected_packages = [] + self.user_selected_packages = [] + # proxy settings self.all_proxy = params["all_proxy"] self.http_proxy = params["http_proxy"]
@@ -157,7 +159,7 @@ class Configuration: self.selected_image = filename template.setVar("__SELECTED_IMAGE__", self.selected_image) template.setVar("DEPENDS", self.selected_recipes) - template.setVar("IMAGE_INSTALL", self.selected_packages) + template.setVar("IMAGE_INSTALL", self.user_selected_packages) # proxy template.setVar("all_proxy", self.all_proxy) template.setVar("http_proxy", self.http_proxy)
lib/bb/ui/crumbs/hoblistmodel.py +17 -0
@@ -342,6 +342,23 @@ class PackageListModel(gtk.TreeStore): self.selection_change_notification() return left + def get_user_selected_packages(self): + packagelist = [] + + it = self.get_iter_first() + while it: + child_it = self.iter_children(it) + while child_it: + if self.get_value(child_it, self.COL_INC): + binb = self.get_value(child_it, self.COL_BINB) + if not binb or binb == "User Selected": + name = self.get_value(child_it, self.COL_NAME) + packagelist.append(name) + child_it = self.iter_next(child_it) + it = self.iter_next(it) + + return packagelist + def get_selected_packages(self): packagelist = []
lib/bb/ui/crumbs/packageselectionpage.py +1 -0
@@ -161,6 +161,7 @@ class PackageSelectionPage (HobPage): self._expand_all() self.builder.configuration.selected_packages = self.package_model.get_selected_packages() + self.builder.configuration.user_selected_packages = self.package_model.get_user_selected_packages() selected_packages_num = len(self.builder.configuration.selected_packages) selected_packages_size = float(self.package_model.get_packages_size()) selected_packages_size_str = self._size_to_string(selected_packages_size)
Signature · 1 line
1.7.4.1
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
In reply to Dongxiao XuFrom the design side of things, I am not sure this is a good idea. I've explicitly selected 'base image x'. If I then customise it, I still think I am working on 'base image x'. I might not understand why my selection of base image has been changed automatically. In general, it is not a good idea to have software that changes things I do of its own accord. Such behaviours undermine the sense of control users should have when interacting with software.
Cheers
Belen
Quoted 87 lines · Dongxiao Xu
Once user did customization to his base image, we change the base image to be "Create your own image" to avoid some issues caused by the relationship between base image and its default recipes and packages.
This fixes [YOCTO #2211]
Signed-off-by Dongxiao Xu <[email protected]>---
lib/bb/ui/crumbs/builder.py | 3 +++ lib/bb/ui/crumbs/imageconfigurationpage.py | 2 ++ lib/bb/ui/crumbs/packageselectionpage.py | 6 ++++++ lib/bb/ui/crumbs/recipeselectionpage.py | 5 +++++ 4 files changed, 16 insertions(+), 0 deletions(-)lib/bb/ui/crumbs/builder.py +3
-0@@ -258,6 +258,9 @@ class Builder(gtk.Window): self.recipe_model = recipe_model self.package_model = package_model + # Indicate whether user has customized the image + self.customized = False + # create visual elements self.create_visual_elements()lib/bb/ui/crumbs/imageconfigurationpage.py +2
-0@@ -289,6 +289,8 @@ class ImageConfigurationPage (HobPage): if not selected_image: return + self.builder.customized = False + selected_recipes = [] image_path = self.builder.recipe_model.pn_path[selected_image]lib/bb/ui/crumbs/packageselectionpage.py +4
-0@@ -90,6 +90,7 @@ class PackageSelectionPage (HobPage): super(PackageSelectionPage, self).__init__(builder, "Packages") # set invisiable members + self.recipe_model = self.builder.recipe_model self.package_model = self.builder.package_model # create visual elements@@ -193,6 +194,11 @@ class PackageSelectionPage (HobPage): self.package_model.exclude_item(item_path=path) self.refresh_selection() + if not self.builder.customized: + self.builder.customized = True + self.builder.configuration.selected_image =self.recipe_model.__dummy_image__
lib/bb/ui/crumbs/packageselectionpage.py +2
-0+ self.builder.rcppkglist_populated() + self.builder.window_sensitive(True) def table_toggled_cb(self, table, cell, view_path, toggled_columnid,
view_tree):lib/bb/ui/crumbs/recipeselectionpage.py +3
-0@@ -187,6 +187,11 @@ class RecipeSelectionPage (HobPage): self.recipe_model.exclude_item(item_path=path) self.refresh_selection() + if not self.builder.customized: + self.builder.customized = True + self.builder.configuration.selected_image =self.recipe_model.__dummy_image__
lib/bb/ui/crumbs/recipeselectionpage.py +2
-0+ self.builder.rcppkglist_populated() + self.builder.window_sensitive(True) def table_toggled_cb(self, table, cell, view_path, toggled_columnid,
Quoted 9 lines
view_tree):Signature · 7 lines
1.7.4.1 _______________________________________________ bitbake-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
Barros Pena, Belen wrote on 2012-04-03:
Quoted 8 lines
From the design side of things, I am not sure this is a good idea. I've explicitly selected 'base image x'. If I then customise it, I still think I am working on 'base image x'. I might not understand why my selection of base image has been changed automatically. In general, it is not a good idea to have software that changes things I do of its own accord. Such behaviours undermine the sense of control users should have when interacting with software.
Quoted 4 lines
Cheers
Belen
What we want is to change the item in the base image combo. The target image is still based on the base image the user selected plus delta. We have the strict definition for the predefined base images. For instance, sato includes 300 recipes.
An image including 299 recipes is not called sato but your own image (say, sato-minus)
The reason why we do that is because for templates, we will remember the item in the image combo as the base image in some bb file, and we also remember what we selected for the recipes and the packages. However, the base image covers all of them by default and because of that, bitbake can't recognize the delta and will include all (300 recipes), which causes the wrong behavior.
--
Shane
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
Thanks for explaining, Shane. I now understand why you are doing it, but people using Hob will not have the benefit of your explanation. They will just see they selected a base image, made a small change to that base image and when they go back to the Image configuration screen, Hob has changed the base image they selected of its own accord.
Could the template have some "hidden" information indicating if a base image has been customised and therefore the default contents of the base image should be ignored and replaced with the remembered recipes and packages? This way the template would still work, but Hob users will still see their selected base image.
Belen
Quoted 31 lines · Shane
Barros Pena, Belen wrote on 2012-04-03:
Quoted 10 lines
From the design side of things, I am not sure this is a good idea. I've explicitly selected 'base image x'. If I then customise it, I still think
I am working on 'base image x'. I might not understand why my selection of
base image has been changed automatically. In general, it is not a good idea to have software that changes things I do of its own accord. Such behaviours undermine the sense of control users should have when interacting with software.Quoted 4 lines
Cheers
Belen
What we want is to change the item in the base image combo. The target image is still based on the base image the user selected plus delta. We have the strict definition for the predefined base images. For instance, sato includes 300 recipes.
An image including 299 recipes is not called sato but your own image (say, sato-minus)The reason why we do that is because for templates, we will remember the item in the image combo as the base image in some bb file, and we also remember what we selected for the recipes and the packages. However, the base image covers all of them by default and because of that, bitbake can't recognize the delta and will include all (300 recipes), which causes the wrong behavior.
Quoted 2 lines
--
Shane
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Richard Purdie
AppliedQuoted 20 lines · Dongxiao Xu
Hi Richard,
This is the hob related bug fixes, please help to review and pull.
This version contains 5 commits that have been sent last time with no comments, and remove the two commits that Josh commented on. Also there are another 5 commits for other bug fixes.
For the two patches that we are discussing, I didn't add them in this series. I will send a separate pull request for it after the decision is finalized.
Thanks,
DongxiaoThe following changes since commit
035e146ff92236a3eda71ad71e8389737f91753b:Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build (2012-03-30 17:19:35 +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 10 lines
Dongxiao Xu (10):
Hob: Fix MACHINE setting
Hob: Update the cache when setting changed
Hob: Remove some calling ofinitiate_new_build()
Hob: Remove duplication for certain bitbake variables
Hob: Set stop button sensitive after task started
Hob: Remove the recipe/task type for multilib
Hob: Fix toolchain build
Hob: Check "dummy" image whileupdate_image_combo
Hob: fixIMAGE_INSTALLsetting while save template
I merged these, thanks.
Quoted 1 line
Hob: Change base image to "Create your own image" if customized
There was a discussion on this one so I left it for now.
Cheers,
Richard
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
In reply to Barros Pena, BelenQuoted 5 lines · Belen
Thanks for explaining, Shane. I now understand why you are doing it, but people using Hob will not have the benefit of your explanation. They will just see they selected a base image, made a small change to that base image and when they go back to the Image configuration screen, Hob has changed the base image they selected of its own accord.
Though the base image is changed to "Create your own image", however all the contents in the base image (except those customized) are still there. If user changes recipes/packages, actually they are trying to create their own image not a base image.
Quoted 6 lines
Could the template have some "hidden" information indicating if a base image has been customised and therefore the default contents of the base image should be ignored and replaced with the remembered recipes and packages? This way the template would still work, but Hob users will still see their selected base image.
Base image is also a recipe, so we could not ignore its related recipes, unless we switch to a new one whose dependency recipes/packages are None. Otherwise, it will change the core base of the Hob logic.
Thanks,
Dongxiao
Quoted 39 lines
Belen
Quoted 33 lines · Shane
Barros Pena, Belen wrote on 2012-04-03:
Quoted 10 lines
From the design side of things, I am not sure this is a good idea. I've explicitly selected 'base image x'. If I then customise it, I still think
I am working on 'base image x'. I might not understand why my selection of
base image has been changed automatically. In general, it is not a good idea to have software that changes things I do of its own accord. Such behaviours undermine the sense of control users should have when interacting with software.Quoted 4 lines
Cheers
Belen
What we want is to change the item in the base image combo. The target image is still based on the base image the user selected plus delta. We have the strict definition for the predefined base images. For instance, sato includes 300 recipes.
An image including 299 recipes is not called sato but your own image (say, sato-minus)The reason why we do that is because for templates, we will remember the item in the image combo as the base image in some bb file, and we also remember what we selected for the recipes and the packages. However, the base image covers all of them by default and because of that, bitbake can't recognize the delta and will include all (300 recipes), which causes the wrong behavior.
--
Shane
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
Quoted 8 lines · Dongxiao
Quoted 6 lines · Belen
Thanks for explaining, Shane. I now understand why you are doing it, but people using Hob will not have the benefit of your explanation. They will
just see they selected a base image, made a small change to that base image and when they go back to the Image configuration screen, Hob has changed the base image they selected of its own accord.
Quoted 4 lines
Though the base image is changed to "Create your own image", however all the contents in the base image (except those customized) are still there. If user changes recipes/packages, actually they are trying to create their own image not a base image.
I don't think so, Dongxiao: for BitBake, the user is trying to create their own image. For me (Hob user) I am trying to create core-image-minimal without recipe x.
But I see we are going to get into one of those circular arguments. We need evidence that this is a problem. Until I can provide you with that, I accept the easiest way to handle this is changing the user selection to "Create your own image" when customisation happens.
What a hard life ;)
Quoted 9 lines
Quoted 8 lines
Could the template have some "hidden" information indicating if a base image has been customised and therefore the default contents of the base image should be ignored and replaced with the remembered recipes and packages? This way the template would still work, but Hob users will still
see their selected base image.
Quoted 54 lines
Base image is also a recipe, so we could not ignore its related recipes, unless we switch to a new one whose dependency recipes/packages are None. Otherwise, it will change the core base of the Hob logic.
Thanks,
DongxiaoQuoted 45 lines
Belen
Quoted 3 lines · Shane
Barros Pena, Belen wrote on 2012-04-03:
Quoted 1 line
From the design side of things, I am not sure this is a good idea.
I've
Quoted 3 lines
Quoted 3 lines
explicitly selected 'base image x'. If I then customise it, I still think
I am working on 'base image x'. I might not understand why myselection
Quoted 2 lines
Quoted 2 lines
of
base image has been changed automatically. In general, it is not agood
Quoted 1 line
Quoted 1 line
idea to have software that changes things I do of its own accord.
Such
Quoted 8 lines
Quoted 7 lines
behaviours undermine the sense of control users should have when interacting with software.
Cheers
Belen
Quoted 8 lines
What we want is to change the item in the base image combo. The target image is still based on the base image the user selected plus delta. We have the strict definition for the predefined base images. For instance, sato includes 300 recipes.
An image including 299 recipes is not called sato but your own image (say, sato-minus)The reason why we do that is because for templates, we will remember
the
Quoted 2 lines
item in the image combo as the base image in some bb file, and we also remember what we selected for the recipes and the packages. However,
the
Quoted 6 lines
base image covers all of them by default and because of that, bitbake can't recognize the delta and will include all (300 recipes), which causes the wrong behavior.
--
Shane
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
Dongxiao suggested another solution. If any recipe is removed from or added into the list.
The base image could be changed into e.g. "core-image-minimal *" or "core-image-minimal-changed" to indicates the set is based on core-image-minimal. Technically, what we want is to change the base image name, we can't reuse "core-image-minimal".
--
Shane
Barros Pena, Belen wrote on 2012-04-06:
Quoted 81 lines · Dongxiao
Quoted 9 lines · Belen
Quoted 6 lines
Thanks for explaining, Shane. I now understand why you are doing it, but people using Hob will not have the benefit of your explanation. They will
just see they selected a base image, made a small change to that base image and when they go back to the Image configuration screen, Hob has changed the base image they selected of its own accord.Quoted 4 lines
Though the base image is changed to "Create your own image", however all the contents in the base image (except those customized) are still there. If user changes recipes/packages, actually they are trying to create their own image not a base image.
I don't think so, Dongxiao: for BitBake, the user is trying to create their own image. For me (Hob user) I am trying to create core-image-minimal without recipe x.
But I see we are going to get into one of those circular arguments. We need evidence that this is a problem. Until I can provide you with that, I accept the easiest way to handle this is changing the user selection to "Create your own image" when customisation happens.
What a hard life ;)
Quoted 54 lines
Quoted 8 lines
Could the template have some "hidden" information indicating if a base image has been customised and therefore the default contents of the base image should be ignored and replaced with the remembered recipes and packages? This way the template would still work, but Hob users will still
see their selected base image.Base image is also a recipe, so we could not ignore its related recipes, unless we switch to a new one whose dependency recipes/packages are None. Otherwise, it will change the core base of the Hob logic.
Thanks,
DongxiaoQuoted 36 lines
Belen
Quoted 30 lines · Shane
Barros Pena, Belen wrote on 2012-04-03:
Quoted 8 lines
From the design side of things, I am not sure this is a good idea. I've explicitly selected 'base image x'. If I then customise it, I still think I am working on 'base image x'. I might not understand why my selection of base image has been changed automatically. In general, it is not a good idea to have software that changes things I do of its own accord. Such behaviours undermine the sense of control users should have when interacting with software.
Quoted 4 lines
Cheers
Belen
What we want is to change the item in the base image combo. The target image is still based on the base image the user selected plus delta. We have the strict definition for the predefined base images. For instance, sato includes 300 recipes. An image including 299 recipes is not called sato but your own image (say, sato-minus)
The reason why we do that is because for templates, we will remember the item in the image combo as the base image in some bb file, and we also remember what we selected for the recipes and the packages. However, the base image covers all of them by default and because of that, bitbake can't recognize the delta and will include all (300 recipes), which causes the wrong behavior.
--
Shane
Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
I see what you are trying to do, but I think this solution also has problems. Would the Base image combo box have to include a .*-changed item for every single base image?
If yes, what happens when I select one of those .*-changed options and I don't customise the image?
If not, wouldn't it be weird to see the base image combo set to an option that was not initially listed?
Cheers
Belen
Quoted 8 lines · Shane
Dongxiao suggested another solution. If any recipe is removed from or added into the list.
The base image could be changed into e.g. "core-image-minimal *" or "core-image-minimal-changed" to indicates the set is based on core-image-minimal.
Technically, what we want is to change the base image name, we can't reuse "core-image-minimal".
Quoted 93 lines
--
ShaneBarros Pena, Belen wrote on 2012-04-06:
Quoted 86 lines · Dongxiao
Quoted 10 lines · Belen
Quoted 7 lines
Thanks for explaining, Shane. I now understand why you are doing it, but
people using Hob will not have the benefit of your explanation. They will
just see they selected a base image, made a small change to that base image and when they go back to the Image configuration screen, Hob has changed the base image they selected of its own accord.Quoted 5 lines
Though the base image is changed to "Create your own image", however all
the contents in the base image (except those customized) are still there. If user changes recipes/packages, actually they are trying to create their own image not a base image.I don't think so, Dongxiao: for BitBake, the user is trying to create their own image. For me (Hob user) I am trying to create core-image-minimal without recipe x.
But I see we are going to get into one of those circular arguments. We need evidence that this is a problem. Until I can provide you with that, I
accept the easiest way to handle this is changing the user selection to "Create your own image" when customisation happens.What a hard life ;)
Quoted 56 lines
Quoted 9 lines
Could the template have some "hidden" information indicating if a base image has been customised and therefore the default contents of the base
image should be ignored and replaced with the remembered recipes and packages? This way the template would still work, but Hob users will still
see their selected base image.Base image is also a recipe, so we could not ignore its related recipes,
unless we switch to a new one whose dependency recipes/packages are None. Otherwise, it will change the core base of the Hob logic.Thanks,
DongxiaoQuoted 36 lines
Belen
Quoted 30 lines · Shane
Barros Pena, Belen wrote on 2012-04-03:
Quoted 8 lines
From the design side of things, I am not sure this is a good idea. I've explicitly selected 'base image x'. If I then customise it, I still think I am working on 'base image x'. I might not understand why my selection of base image has been changed automatically. In general, it is not a good idea to have software that changes things I do of its own accord. Such behaviours undermine the sense of control users should have when interacting with software.
Quoted 4 lines
Cheers
Belen
What we want is to change the item in the base image combo. The target image is still based on the base image the user selected plus delta. We have the strict definition for the predefined base images. For instance, sato includes 300 recipes. An image including 299 recipes is not called sato but your own image (say, sato-minus)
The reason why we do that is because for templates, we will remember the item in the image combo as the base image in some bb file, and we also remember what we selected for the recipes and the packages. However, the base image covers all of them by default and because of that, bitbake can't recognize the delta and will include all (300 recipes), which causes the wrong behavior.
--
Shane
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.