All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10][PULL] Hob: Bug fixes
@ 2012-04-01 12:14 Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 01/10] Hob: Fix MACHINE setting Dongxiao Xu
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

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(-)

-- 
1.7.4.1




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 01/10] Hob: Fix MACHINE setting
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 02/10] Hob: Update the cache when setting changed Dongxiao Xu
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

Define the empty curr_mach to be "" instead of None.
Fix the judgement for ' if self.curr_mach == "" ' to be
' if self.curr_mach '.
Also set machine to bitbake server when "MACHINE" is not empty.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builder.py         |    4 ++--
 lib/bb/ui/crumbs/hobeventhandler.py |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index c1a75bd..02c9a9c 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index a329380..3d5df9e 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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])
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 02/10] Hob: Update the cache when setting changed
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 01/10] Hob: Fix MACHINE setting Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 03/10] Hob: Remove some calling of initiate_new_build() Dongxiao Xu
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

If values in advanced is changed, we also need to reparse the cache to
get the latest value.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builder.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 02c9a9c..44b208a 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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)
 
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 03/10] Hob: Remove some calling of initiate_new_build()
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 01/10] Hob: Fix MACHINE setting Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 02/10] Hob: Update the cache when setting changed Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 04/10] Hob: Remove duplication for certain bitbake variables Dongxiao Xu
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

initiate_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.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/imagedetailspage.py |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
index b70440d..b12014a 100755
--- a/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/lib/bb/ui/crumbs/imagedetailspage.py
@@ -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()
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 04/10] Hob: Remove duplication for certain bitbake variables
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (2 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 03/10] Hob: Remove some calling of initiate_new_build() Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 05/10] Hob: Set stop button sensitive after task started Dongxiao Xu
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

Sometimes, 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.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 3d5df9e..74081dc 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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 ""
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 05/10] Hob: Set stop button sensitive after task started
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (3 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 04/10] Hob: Remove duplication for certain bitbake variables Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 06/10] Hob: Remove the recipe/task type for multilib Dongxiao Xu
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builddetailspage.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/crumbs/builddetailspage.py b/lib/bb/ui/crumbs/builddetailspage.py
index aee258a..982166a 100755
--- a/lib/bb/ui/crumbs/builddetailspage.py
+++ b/lib/bb/ui/crumbs/builddetailspage.py
@@ -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
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 06/10] Hob: Remove the recipe/task type for multilib
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (4 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 05/10] Hob: Set stop button sensitive after task started Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 07/10] Hob: Fix toolchain build Dongxiao Xu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

We will not display multilib recipes and tasks in separate tabs,
therefore remove the specific types.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hoblistmodel.py |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index a09c7c7..6a829e2 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -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,
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 07/10] Hob: Fix toolchain build
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (5 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 06/10] Hob: Remove the recipe/task type for multilib Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 08/10] Hob: Check "dummy" image while update_image_combo Dongxiao Xu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

Originally 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]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 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(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 44b208a..8427623 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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):
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 74081dc..8909e01 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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)
diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 6a829e2..a351597 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -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.
     """
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 08/10] Hob: Check "dummy" image while update_image_combo
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (6 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 07/10] Hob: Fix toolchain build Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-01 12:14 ` [PATCH 09/10] Hob: Change base image to "Create your own image" if customized Dongxiao Xu
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

We 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.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/imageconfigurationpage.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 30f8979..9271c48 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -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()
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (7 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 08/10] Hob: Check "dummy" image while update_image_combo Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-03  9:13   ` Barros Pena, Belen
  2012-04-01 12:14 ` [PATCH 10/10] Hob: fix IMAGE_INSTALL setting while save template Dongxiao Xu
  2012-04-05 13:03 ` [PATCH 00/10][PULL] Hob: Bug fixes Richard Purdie
  10 siblings, 1 reply; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

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 <dongxiao.xu@intel.com>
---
 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(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 8427623..20d4652 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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()
 
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 9271c48..d3cae9d 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -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]
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index d855e58..e071b07 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -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):
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index e4616a8..2d438d5 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -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):
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 10/10] Hob: fix IMAGE_INSTALL setting while save template
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (8 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 09/10] Hob: Change base image to "Create your own image" if customized Dongxiao Xu
@ 2012-04-01 12:14 ` Dongxiao Xu
  2012-04-05 13:03 ` [PATCH 00/10][PULL] Hob: Bug fixes Richard Purdie
  10 siblings, 0 replies; 19+ messages in thread
From: Dongxiao Xu @ 2012-04-01 12:14 UTC (permalink / raw)
  To: bitbake-devel

If 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.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 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(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 20d4652..3ff6df7 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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)
diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index a351597..5dddffa 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -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 = []
 
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index e071b07..0a7474e 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -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)
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-01 12:14 ` [PATCH 09/10] Hob: Change base image to "Create your own image" if customized Dongxiao Xu
@ 2012-04-03  9:13   ` Barros Pena, Belen
  2012-04-04 12:58     ` Wang, Shane
  0 siblings, 1 reply; 19+ messages in thread
From: Barros Pena, Belen @ 2012-04-03  9:13 UTC (permalink / raw)
  To: Xu, Dongxiao, bitbake-devel

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.

Cheers

Belen

On 01/04/2012 13:14, "Dongxiao Xu" <dongxiao.xu@intel.com> wrote:

>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 <dongxiao.xu@intel.com>
>---
> 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(-)
>
>diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
>index 8427623..20d4652 100755
>--- a/lib/bb/ui/crumbs/builder.py
>+++ b/lib/bb/ui/crumbs/builder.py
>@@ -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()
> 
>diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py
>b/lib/bb/ui/crumbs/imageconfigurationpage.py
>index 9271c48..d3cae9d 100644
>--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
>+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
>@@ -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]
>diff --git a/lib/bb/ui/crumbs/packageselectionpage.py
>b/lib/bb/ui/crumbs/packageselectionpage.py
>index d855e58..e071b07 100755
>--- a/lib/bb/ui/crumbs/packageselectionpage.py
>+++ b/lib/bb/ui/crumbs/packageselectionpage.py
>@@ -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):
>diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py
>b/lib/bb/ui/crumbs/recipeselectionpage.py
>index e4616a8..2d438d5 100755
>--- a/lib/bb/ui/crumbs/recipeselectionpage.py
>+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
>@@ -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):
>-- 
>1.7.4.1
>
>
>_______________________________________________
>bitbake-devel mailing list
>bitbake-devel@lists.openembedded.org
>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.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-03  9:13   ` Barros Pena, Belen
@ 2012-04-04 12:58     ` Wang, Shane
  2012-04-04 15:21       ` Barros Pena, Belen
  0 siblings, 1 reply; 19+ messages in thread
From: Wang, Shane @ 2012-04-04 12:58 UTC (permalink / raw)
  To: Barros Pena, Belen, Xu, Dongxiao, bitbake-devel

Barros Pena, Belen wrote on 2012-04-03:

> 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.
> 
> 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



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-04 12:58     ` Wang, Shane
@ 2012-04-04 15:21       ` Barros Pena, Belen
  2012-04-06  3:45         ` Xu, Dongxiao
  0 siblings, 1 reply; 19+ messages in thread
From: Barros Pena, Belen @ 2012-04-04 15:21 UTC (permalink / raw)
  To: Wang, Shane, Xu, Dongxiao, bitbake-devel

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

On 04/04/2012 13:58, "Wang, Shane" <shane.wang@intel.com> wrote:

>Barros Pena, Belen wrote on 2012-04-03:
>
>> 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.
>> 
>> 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.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/10][PULL] Hob: Bug fixes
  2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
                   ` (9 preceding siblings ...)
  2012-04-01 12:14 ` [PATCH 10/10] Hob: fix IMAGE_INSTALL setting while save template Dongxiao Xu
@ 2012-04-05 13:03 ` Richard Purdie
  10 siblings, 0 replies; 19+ messages in thread
From: Richard Purdie @ 2012-04-05 13:03 UTC (permalink / raw)
  To: Dongxiao Xu; +Cc: bitbake-devel

On Sun, 2012-04-01 at 20:14 +0800, Dongxiao Xu wrote:
> 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: fix IMAGE_INSTALL setting while save template

I merged these, thanks.

>  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




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-04 15:21       ` Barros Pena, Belen
@ 2012-04-06  3:45         ` Xu, Dongxiao
  2012-04-06  8:22           ` Barros Pena, Belen
  0 siblings, 1 reply; 19+ messages in thread
From: Xu, Dongxiao @ 2012-04-06  3:45 UTC (permalink / raw)
  To: Barros Pena, Belen; +Cc: bitbake-devel

On Wed, 2012-04-04 at 23:21 +0800, Barros Pena, Belen wrote:
> 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.

> 
> 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

> 
> Belen
> 
> On 04/04/2012 13:58, "Wang, Shane" <shane.wang@intel.com> wrote:
> 
> >Barros Pena, Belen wrote on 2012-04-03:
> >
> >> 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.
> >> 
> >> 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
> 





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-06  3:45         ` Xu, Dongxiao
@ 2012-04-06  8:22           ` Barros Pena, Belen
  2012-04-08 10:10             ` Wang, Shane
  0 siblings, 1 reply; 19+ messages in thread
From: Barros Pena, Belen @ 2012-04-06  8:22 UTC (permalink / raw)
  To: Xu, Dongxiao; +Cc: bitbake-devel


On 06/04/2012 04:45, "Xu, Dongxiao" <dongxiao.xu@intel.com> wrote:

>On Wed, 2012-04-04 at 23:21 +0800, Barros Pena, Belen wrote:
>> 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.

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 ;)

>
>> 
>> 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
>
>> 
>> Belen
>> 
>> On 04/04/2012 13:58, "Wang, Shane" <shane.wang@intel.com> wrote:
>> 
>> >Barros Pena, Belen wrote on 2012-04-03:
>> >
>> >> 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.
>> >> 
>> >> 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.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-06  8:22           ` Barros Pena, Belen
@ 2012-04-08 10:10             ` Wang, Shane
  2012-04-16 12:32               ` Barros Pena, Belen
  0 siblings, 1 reply; 19+ messages in thread
From: Wang, Shane @ 2012-04-08 10:10 UTC (permalink / raw)
  To: Barros Pena, Belen, Xu, Dongxiao; +Cc: bitbake-devel

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:

> 
> On 06/04/2012 04:45, "Xu, Dongxiao" <dongxiao.xu@intel.com> wrote:
> 
>> On Wed, 2012-04-04 at 23:21 +0800, Barros Pena, Belen wrote:
>>> 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.
> 
> 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 ;)
> 
>> 
>>> 
>>> 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
>> 
>>> 
>>> Belen
>>> 
>>> On 04/04/2012 13:58, "Wang, Shane" <shane.wang@intel.com> wrote:
>>> 
>>>> Barros Pena, Belen wrote on 2012-04-03:
>>>> 
>>>>> 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.
>>>>> 
>>>>> 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
>>> 
>> 
>>





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] Hob: Change base image to "Create your own image" if customized
  2012-04-08 10:10             ` Wang, Shane
@ 2012-04-16 12:32               ` Barros Pena, Belen
  0 siblings, 0 replies; 19+ messages in thread
From: Barros Pena, Belen @ 2012-04-16 12:32 UTC (permalink / raw)
  To: Wang, Shane, Xu, Dongxiao; +Cc: bitbake-devel

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

On 08/04/2012 11:10, "Wang, Shane" <shane.wang@intel.com> wrote:

>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:
>
>> 
>> On 06/04/2012 04:45, "Xu, Dongxiao" <dongxiao.xu@intel.com> wrote:
>> 
>>> On Wed, 2012-04-04 at 23:21 +0800, Barros Pena, Belen wrote:
>>>> 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.
>> 
>> 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 ;)
>> 
>>> 
>>>> 
>>>> 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
>>> 
>>>> 
>>>> Belen
>>>> 
>>>> On 04/04/2012 13:58, "Wang, Shane" <shane.wang@intel.com> wrote:
>>>> 
>>>>> Barros Pena, Belen wrote on 2012-04-03:
>>>>> 
>>>>>> 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.
>>>>>> 
>>>>>> 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.




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-04-16 12:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-01 12:14 [PATCH 00/10][PULL] Hob: Bug fixes Dongxiao Xu
2012-04-01 12:14 ` [PATCH 01/10] Hob: Fix MACHINE setting Dongxiao Xu
2012-04-01 12:14 ` [PATCH 02/10] Hob: Update the cache when setting changed Dongxiao Xu
2012-04-01 12:14 ` [PATCH 03/10] Hob: Remove some calling of initiate_new_build() Dongxiao Xu
2012-04-01 12:14 ` [PATCH 04/10] Hob: Remove duplication for certain bitbake variables Dongxiao Xu
2012-04-01 12:14 ` [PATCH 05/10] Hob: Set stop button sensitive after task started Dongxiao Xu
2012-04-01 12:14 ` [PATCH 06/10] Hob: Remove the recipe/task type for multilib Dongxiao Xu
2012-04-01 12:14 ` [PATCH 07/10] Hob: Fix toolchain build Dongxiao Xu
2012-04-01 12:14 ` [PATCH 08/10] Hob: Check "dummy" image while update_image_combo Dongxiao Xu
2012-04-01 12:14 ` [PATCH 09/10] Hob: Change base image to "Create your own image" if customized Dongxiao Xu
2012-04-03  9:13   ` Barros Pena, Belen
2012-04-04 12:58     ` Wang, Shane
2012-04-04 15:21       ` Barros Pena, Belen
2012-04-06  3:45         ` Xu, Dongxiao
2012-04-06  8:22           ` Barros Pena, Belen
2012-04-08 10:10             ` Wang, Shane
2012-04-16 12:32               ` Barros Pena, Belen
2012-04-01 12:14 ` [PATCH 10/10] Hob: fix IMAGE_INSTALL setting while save template Dongxiao Xu
2012-04-05 13:03 ` [PATCH 00/10][PULL] Hob: Bug fixes Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.