All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17][PULL] Hob: Bunch of bug fixes
@ 2012-03-21 12:55 Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 01/17] Hob: Still use initcmd != None as the if judgement Dongxiao Xu
                   ` (17 more replies)
  0 siblings, 18 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Hi Richard,

This pull request is Hob related bug fixes. Please help to review and pull.

Thanks,
Dongxiao

The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:

  Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix

Dongxiao Xu (14):
  Hob: Still use initcmd != None as the if judgement
  Hob: Remove split model in GTK Hob
  cooker: terminate each process when quitting recipe parsing
  Hob: change package classes selection GUI
  Hob: Change template button name from "Template" to "Templates"
  command.py: Change parseConfigurationFiles API from async to sync
  process.py: Increase the timeout value for polling commands
  Hob: Change parseConfigurationFiles API usage
  Hob: Fix the workaround to get image types
  Hob: Change recipe selection tab order
  Hob: Change package selection tab order
  Hob: Move "Create your own image" to the bottom of image list
  cooker: add inherit information when generating package tree
  Hob: Use inherit information to judge if a recipe is image type

Shane Wang (3):
  Hob: Change window title from HOB to Hob
  Hob: Change "View Packages" description
  Hob: Change the titles for recipe view and package view

 lib/bb/command.py                          |   17 +-
 lib/bb/cooker.py                           |    3 +
 lib/bb/server/process.py                   |    2 +-
 lib/bb/ui/crumbs/builder.py                |   15 +--
 lib/bb/ui/crumbs/hig.py                    |  284 ++++++++--------------------
 lib/bb/ui/crumbs/hobeventhandler.py        |   48 ++---
 lib/bb/ui/crumbs/hoblistmodel.py           |   11 +-
 lib/bb/ui/crumbs/imageconfigurationpage.py |   13 +-
 lib/bb/ui/crumbs/packageselectionpage.py   |   42 ++--
 lib/bb/ui/crumbs/recipeselectionpage.py    |   50 +++---
 lib/bb/ui/hob.py                           |   14 +-
 11 files changed, 177 insertions(+), 322 deletions(-)

-- 
1.7.4.1




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

* [PATCH 01/17] Hob: Still use initcmd != None as the if judgement
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 02/17] Hob: Remove split model in GTK Hob Dongxiao Xu
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

This commit reverts part of change in 491c87d1, since initcmd has a
possible value of 0, therefore we must explicitly compare the initcmd
with None in if judgement.

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

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 71df81c..e24c340 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -119,7 +119,7 @@ class HobHandler(gobject.GObject):
             self.generating = False
 
     def run_next_command(self, initcmd=None):
-        if initcmd:
+        if initcmd != None:
             self.initcmd = initcmd
 
         if self.commands_async:
@@ -127,7 +127,7 @@ class HobHandler(gobject.GObject):
             next_command = self.commands_async.pop(0)
         else:
             self.clear_busy()
-            if self.initcmd:
+            if self.initcmd != None:
                 self.emit("command-succeeded", self.initcmd)
             return
 
-- 
1.7.4.1




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

* [PATCH 02/17] Hob: Remove split model in GTK Hob
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 01/17] Hob: Still use initcmd != None as the if judgement Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 03/17] cooker: terminate each process when quitting recipe parsing Dongxiao Xu
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Since the GTK Hob will not use the server/client split model, thus
remove it from current Hob code. But we still keep the core mechanism
in bitbake server.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builder.py         |   13 +----
 lib/bb/ui/crumbs/hig.py             |  103 ++++++++++++-----------------------
 lib/bb/ui/crumbs/hobeventhandler.py |   21 +------
 lib/bb/ui/hob.py                    |   11 +----
 4 files changed, 41 insertions(+), 107 deletions(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index b1aad54..d3b13c9 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -260,21 +260,14 @@ class Builder(gtk.Window):
         self.show_all()
         self.nb.set_current_page(0)
 
-    def get_split_model(self):
-        return self.handler.split_model
-
     def load_template(self, path):
         self.template = TemplateMgr()
         self.template.load(path)
         self.configuration.load(self.template)
 
-        if self.get_split_model():
-            if not set(self.configuration.layers) <= set(self.parameters.all_layers):
+        for layer in self.configuration.layers:
+            if not os.path.exists(layer+'/conf/layer.conf'):
                 return False
-        else:
-            for layer in self.configuration.layers:
-                if not os.path.exists(layer+'/conf/layer.conf'):
-                    return False
 
         self.switch_page(self.LAYER_CHANGED)
 
@@ -674,7 +667,6 @@ class Builder(gtk.Window):
         dialog = LayerSelectionDialog(title = "Layer Selection",
                      layers = copy.deepcopy(self.configuration.layers),
                      all_layers = self.parameters.all_layers,
-                     split_model = self.get_split_model(),
                      parent = self,
                      flags = gtk.DIALOG_MODAL
                          | gtk.DIALOG_DESTROY_WITH_PARENT
@@ -748,7 +740,6 @@ class Builder(gtk.Window):
             all_distros = self.parameters.all_distros,
             all_sdk_machines = self.parameters.all_sdk_machines,
             max_threads = self.parameters.max_threads,
-            split_model = self.get_split_model(),
             parent = self,
             flags = gtk.DIALOG_MODAL
                     | gtk.DIALOG_DESTROY_WITH_PARENT
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index baad7b8..bd27375 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -170,23 +170,20 @@ class AdvancedSettingDialog (CrumbsDialog):
 
         dialog.destroy()
 
-    def gen_entry_widget(self, split_model, content, parent, tooltip=""):
+    def gen_entry_widget(self, content, parent, tooltip=""):
         hbox = gtk.HBox(False, 12)
         entry = gtk.Entry()
         entry.set_text(content)
 
-        if split_model:
-            hbox.pack_start(entry, expand=True, fill=True)
-        else:
-            table = gtk.Table(1, 10, True)
-            hbox.pack_start(table, expand=True, fill=True)
-            table.attach(entry, 0, 9, 0, 1)
-            image = gtk.Image()
-            image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON)
-            open_button = gtk.Button()
-            open_button.set_image(image)
-            open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)
-            table.attach(open_button, 9, 10, 0, 1)
+        table = gtk.Table(1, 10, True)
+        hbox.pack_start(table, expand=True, fill=True)
+        table.attach(entry, 0, 9, 0, 1)
+        image = gtk.Image()
+        image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON)
+        open_button = gtk.Button()
+        open_button.set_image(image)
+        open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)
+        table.attach(open_button, 9, 10, 0, 1)
 
         info = HobInfoButton(tooltip, self)
         hbox.pack_start(info, expand=False, fill=False)
@@ -421,7 +418,7 @@ class AdvancedSettingDialog (CrumbsDialog):
 
     def __init__(self, title, configuration, all_image_types,
             all_package_formats, all_distros, all_sdk_machines,
-            max_threads, split_model, parent, flags, buttons):
+            max_threads, parent, flags, buttons):
         super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons)
 
         # class members from other objects
@@ -432,7 +429,6 @@ class AdvancedSettingDialog (CrumbsDialog):
         self.all_distros = all_distros
         self.all_sdk_machines = all_sdk_machines
         self.max_threads = max_threads
-        self.split_model = split_model 
 
         # class members for internal use
         self.pkgfmt_store = None
@@ -586,7 +582,7 @@ class AdvancedSettingDialog (CrumbsDialog):
         advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
         label = self.gen_label_widget("<span weight=\"bold\">Set Download Directory:</span>")
         tooltip = "Select a folder that caches the upstream project source code"
-        dldir_widget, self.dldir_text = self.gen_entry_widget(self.split_model, self.configuration.dldir, self, tooltip)
+        dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
         sub_vbox.pack_start(label, expand=False, fill=False)
         sub_vbox.pack_start(dldir_widget, expand=False, fill=False)
 
@@ -594,7 +590,7 @@ class AdvancedSettingDialog (CrumbsDialog):
         advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
         label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE Directory:</span>")
         tooltip = "Select a folder that caches your prebuilt results"
-        sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.split_model, self.configuration.sstatedir, self, tooltip)
+        sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)
         sub_vbox.pack_start(label, expand=False, fill=False)
         sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False)
 
@@ -602,7 +598,7 @@ class AdvancedSettingDialog (CrumbsDialog):
         advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
         label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE Mirror:</span>")
         tooltip = "Select the prebuilt mirror that will fasten your build speed"
-        sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.split_model, self.configuration.sstatemirror, self, tooltip)
+        sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)
         sub_vbox.pack_start(label, expand=False, fill=False)
         sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)
 
@@ -850,7 +846,7 @@ class LayerSelectionDialog (CrumbsDialog):
             layer_store.remove(iter)
 
 
-    def gen_layer_widget(self, split_model, layers, layers_avail, window, tooltip=""):
+    def gen_layer_widget(self, layers, layers_avail, window, tooltip=""):
         hbox = gtk.HBox(False, 6)
 
         layer_tv = gtk.TreeView()
@@ -874,57 +870,36 @@ class LayerSelectionDialog (CrumbsDialog):
         table_layer = gtk.Table(2, 10, False)
         hbox.pack_start(table_layer, expand=True, fill=True)
 
-        if split_model:
-            table_layer.attach(scroll, 0, 10, 0, 2)
+        table_layer.attach(scroll, 0, 10, 0, 1)
 
-            layer_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_BOOLEAN)
-            for layer in layers:
-                layer_store.set(layer_store.append(), 0, layer, 1, True)
-            for layer in layers_avail:
-                if layer not in layers:
-                    layer_store.set(layer_store.append(), 0, layer, 1, False)
+        layer_store = gtk.ListStore(gobject.TYPE_STRING)
+        for layer in layers:
+            layer_store.set(layer_store.append(), 0, layer)
 
-            col1 = gtk.TreeViewColumn('Included')
-            layer_tv.append_column(col1)
-
-            cell1 = gtk.CellRendererToggle()
-            cell1.connect("toggled", self.layer_widget_toggled_cb, layer_store)
-            col1.pack_start(cell1, True)
-            col1.set_attributes(cell1, active=1)
-
-        else:
-            table_layer.attach(scroll, 0, 10, 0, 1)
-
-            layer_store = gtk.ListStore(gobject.TYPE_STRING)
-            for layer in layers:
-                layer_store.set(layer_store.append(), 0, layer)
-
-            image = gtk.Image()
-            image.set_from_stock(gtk.STOCK_ADD,gtk.ICON_SIZE_MENU)
-            add_button = gtk.Button()
-            add_button.set_image(image)
-            add_button.connect("clicked", self.layer_widget_add_clicked_cb, layer_store, window)
-            table_layer.attach(add_button, 0, 5, 1, 2, gtk.EXPAND | gtk.FILL, 0, 0, 6)
-            image = gtk.Image()
-            image.set_from_stock(gtk.STOCK_REMOVE,gtk.ICON_SIZE_MENU)
-            del_button = gtk.Button()
-            del_button.set_image(image)
-            del_button.connect("clicked", self.layer_widget_del_clicked_cb, tree_selection, layer_store)
-            table_layer.attach(del_button, 5, 10, 1, 2, gtk.EXPAND | gtk.FILL, 0, 0, 6)
+        image = gtk.Image()
+        image.set_from_stock(gtk.STOCK_ADD,gtk.ICON_SIZE_MENU)
+        add_button = gtk.Button()
+        add_button.set_image(image)
+        add_button.connect("clicked", self.layer_widget_add_clicked_cb, layer_store, window)
+        table_layer.attach(add_button, 0, 5, 1, 2, gtk.EXPAND | gtk.FILL, 0, 0, 6)
+        image = gtk.Image()
+        image.set_from_stock(gtk.STOCK_REMOVE,gtk.ICON_SIZE_MENU)
+        del_button = gtk.Button()
+        del_button.set_image(image)
+        del_button.connect("clicked", self.layer_widget_del_clicked_cb, tree_selection, layer_store)
+        table_layer.attach(del_button, 5, 10, 1, 2, gtk.EXPAND | gtk.FILL, 0, 0, 6)
         layer_tv.set_model(layer_store)
 
         hbox.show_all()
 
         return hbox, layer_store
 
-    def __init__(self, title, layers, all_layers, split_model,
-            parent, flags, buttons):
+    def __init__(self, title, layers, all_layers, parent, flags, buttons):
         super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons)
 
         # class members from other objects
         self.layers = layers
         self.all_layers = all_layers
-        self.split_model = split_model
         self.layers_changed = False
 
         # class members for internal use
@@ -938,17 +913,14 @@ class LayerSelectionDialog (CrumbsDialog):
         hbox_top = gtk.HBox()
         self.vbox.pack_start(hbox_top, expand=False, fill=False)
 
-        if self.split_model:
-            label = self.gen_label_widget("<b>Select Layers:</b>\n(Available layers under '${COREBASE}/layers/' directory)")
-        else:
-            label = self.gen_label_widget("<b>Select Layers:</b>")
+        label = self.gen_label_widget("<b>Select Layers:</b>")
         hbox_top.pack_start(label, expand=False, fill=False)
 
         tooltip = "Layer is a collection of bb files and conf files"
         info = HobInfoButton(tooltip, self)
         hbox_top.pack_end(info, expand=False, fill=False)
 
-        layer_widget, self.layer_store = self.gen_layer_widget(self.split_model, self.layers, self.all_layers, self, None)
+        layer_widget, self.layer_store = self.gen_layer_widget(self.layers, self.all_layers, self, None)
         layer_widget.set_size_request(-1, 180)
         self.vbox.pack_start(layer_widget, expand=True, fill=True)
 
@@ -963,12 +935,7 @@ class LayerSelectionDialog (CrumbsDialog):
         it = model.get_iter_first()
         layers = []
         while it:
-            if self.split_model:
-                inc = model.get_value(it, 1)
-                if inc:
-                    layers.append(model.get_value(it, 0))
-            else:
-                layers.append(model.get_value(it, 0))
+            layers.append(model.get_value(it, 0))
             it = model.iter_next(it)
 
         self.layers_changed = (self.layers != layers)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index e24c340..07cc039 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -65,7 +65,7 @@ class HobHandler(gobject.GObject):
     (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_CONFIG, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(13)
     (LAYERS_REFRESH, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5)
 
-    def __init__(self, server, server_addr, client_addr, recipe_model, package_model):
+    def __init__(self, server, recipe_model, package_model):
         super(HobHandler, self).__init__()
 
         self.build = RunningBuild(sequential=True)
@@ -84,20 +84,11 @@ class HobHandler(gobject.GObject):
         self.error_msg = ""
         self.initcmd = None
 
-        self.split_model = False
-        if server_addr and client_addr:
-            self.split_model = (server_addr != client_addr)
-            self.reset_server() # reset server if server was found just now
-        self.server_addr = server_addr
-
     def kick(self):
         import xmlrpclib
         try:
             # kick the while thing off
-            if self.split_model:
-                self.commands_async.append(self.CFG_AVAIL_LAYERS)
-            else:
-                self.commands_async.append(self.CFG_PATH_LAYERS)
+            self.commands_async.append(self.CFG_PATH_LAYERS)
             self.commands_async.append(self.CFG_FILES_DISTRO)
             self.commands_async.append(self.CFG_FILES_MACH)
             self.commands_async.append(self.CFG_FILES_SDKMACH)
@@ -383,9 +374,6 @@ class HobHandler(gobject.GObject):
             # leave the workdir in a usable state
             self.server.runCommand(["stateShutdown"])
 
-    def reset_server(self):
-        self.server.runCommand(["resetCooker"])
-
     def reset_build(self):
         self.build.reset()
 
@@ -427,10 +415,7 @@ class HobHandler(gobject.GObject):
             pmake = int(pmake.lstrip("-j "))
         params["pmake"] = pmake
 
-        image_addr = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
-        if self.server_addr:
-            image_addr = "http://" + self.server_addr + ":" + image_addr
-        params["image_addr"] = image_addr
+        params["image_addr"] = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
 
         image_extra_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"])
         if not image_extra_size:
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 429bb75..daa708b 100755
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -47,15 +47,6 @@ def event_handle_idle_func(eventHandler, hobHandler):
     return True
 
 def main (server = None, eventHandler = None):
-    bitbake_server = None
-    client_addr = None
-    server_addr = None
-
-    if not eventHandler:
-        helper = uihelper.BBUIHelper()
-        server, eventHandler, server_addr, client_addr = helper.findServerDetails()
-    bitbake_server = server
-
     gobject.threads_init()
 
     # That indicates whether the Hob and the bitbake server are
@@ -64,7 +55,7 @@ def main (server = None, eventHandler = None):
     recipe_model = RecipeListModel()
     package_model = PackageListModel()
 
-    hobHandler = HobHandler(bitbake_server, server_addr, client_addr, recipe_model, package_model)
+    hobHandler = HobHandler(server, recipe_model, package_model)
     if hobHandler.kick() == False:
         return 1
     builder = Builder(hobHandler, recipe_model, package_model)
-- 
1.7.4.1




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

* [PATCH 03/17] cooker: terminate each process when quitting recipe parsing
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 01/17] Hob: Still use initcmd != None as the if judgement Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 02/17] Hob: Remove split model in GTK Hob Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 04/17] Hob: change package classes selection GUI Dongxiao Xu
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

In some cases (e.x., Hob), users may quit the GUI when bitbake server
is doing the recipe parsing. In this case, we will see the Hob
command line hang and could not return to shell (Ctrl+C doesn't work).

The fix is to terminate the process when exiting the parsing.

This fixes [YOCTO #2142]

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

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 1fd2c13..a000f72 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1603,6 +1603,7 @@ class CookerParser(object):
 
             self.parser_quit.cancel_join_thread()
             for process in self.processes:
+                process.terminate()
                 self.parser_quit.put(None)
 
             self.jobs.cancel_join_thread()
-- 
1.7.4.1




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

* [PATCH 04/17] Hob: change package classes selection GUI
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (2 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 03/17] cooker: terminate each process when quitting recipe parsing Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 05/17] Hob: Change template button name from "Template" to "Templates" Dongxiao Xu
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

This commit change the GUI for package classes selection in advanced
setting dialog, which conforms with UI team's design.

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

diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index bd27375..e675f39 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -191,146 +191,58 @@ class AdvancedSettingDialog (CrumbsDialog):
         hbox.show_all()
         return hbox, entry
 
-    def pkgfmt_widget_sort_func(self, model, iter1, iter2, data):
-        val1 = model.get_value(iter1, 0)
-        val2 = model.get_value(iter2, 0)
-        inc1 = model.get_value(iter1, 2)
-        inc2 = model.get_value(iter2, 2)
-        if inc1 != inc2:
-            return inc2 - inc1
-        else:
-            return val1 - val2
-
-    def pkgfmt_widget_tree_selection_changed_cb(self, tree_selection, button1, button2):
-        (model, it) = tree_selection.get_selected()
-        inc = model.get_value(it, 2)
-        if inc:
-            button1.set_sensitive(True)
-            button2.set_sensitive(True)
-        else:
-            button1.set_sensitive(False)
-            button2.set_sensitive(False)
-
-    def pkgfmt_widget_up_clicked_cb(self, button, tree_selection):
-        (model, it) = tree_selection.get_selected()
-        if not it:
-            return
-        path = model.get_path(it)
-        if path[0] <= 0:
-            return
-
-        pre_it = model.get_iter_first()
-        if not pre_it:
-            return
-        else:
-            while model.iter_next(pre_it) :
-                if model.get_value(model.iter_next(pre_it), 1) != model.get_value(it, 1):
-                    pre_it = model.iter_next(pre_it)
-                else:
-                    break
-
-            cur_index = model.get_value(it, 0)
-            pre_index = cur_index
-            if pre_it:
-                model.set(pre_it, 0, pre_index)
-            cur_index = cur_index - 1
-            model.set(it, 0, cur_index)
-
-    def pkgfmt_widget_down_clicked_cb(self, button, tree_selection):
-        (model, it) = tree_selection.get_selected()
-        if not it:
-            return
-        next_it = model.iter_next(it)
-        if not next_it:
-            return
-        cur_index = model.get_value(it, 0)
-        next_index = cur_index
-        model.set(next_it, 0, next_index)
-        cur_index = cur_index + 1
-        model.set(it, 0, cur_index)
-
-    def pkgfmt_widget_toggle_cb(self, cell, path, model, column):
-        it = model.get_iter(path)
-        val = model.get_value(it, column)
-        val = not val
-        model.set(it, column, val)
+    def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
+        combo_item = self.rootfs_combo.get_active_text()
+        for child in check_hbox.get_children():
+            if isinstance(child, gtk.CheckButton):
+                check_hbox.remove(child)
+        for format in all_package_format:
+            if format != combo_item:
+                check_button = gtk.CheckButton(format)
+                check_hbox.pack_start(check_button, expand=False, fill=False)
+        check_hbox.show_all()
 
     def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip=""):
-        pkgfmt_hbox = gtk.HBox(False, 12)
+        pkgfmt_hbox = gtk.HBox(False, 24)
 
-        pkgfmt_store = gtk.ListStore(int, str, gobject.TYPE_BOOLEAN)
-        for format in curr_package_format.split():
-            pkgfmt_store.set(pkgfmt_store.append(), 1, format, 2, True)
-        for format in all_package_format:
-            if format not in curr_package_format:
-                pkgfmt_store.set(pkgfmt_store.append(), 1, format, 2, False)
-        pkgfmt_tree = gtk.TreeView(pkgfmt_store)
-        pkgfmt_tree.set_headers_clickable(True)
-        pkgfmt_tree.set_headers_visible(False)
-        tree_selection = pkgfmt_tree.get_selection()
-        tree_selection.set_mode(gtk.SELECTION_SINGLE)
+        rootfs_vbox = gtk.VBox(False, 6)
+        pkgfmt_hbox.pack_start(rootfs_vbox, expand=False, fill=False)
 
-        col = gtk.TreeViewColumn('NO')
-        col.set_sort_column_id(0)
-        col.set_sort_order(gtk.SORT_ASCENDING)
-        col.set_clickable(False)
-        col1 = gtk.TreeViewColumn('TYPE')
-        col1.set_min_width(130)
-        col1.set_max_width(140)
-        col2 = gtk.TreeViewColumn('INCLUDED')
-        col2.set_min_width(60)
-        col2.set_max_width(70)
-        pkgfmt_tree.append_column(col1)
-        pkgfmt_tree.append_column(col2)
-        cell = gtk.CellRendererText()
-        cell1 = gtk.CellRendererText()
-        cell1.set_property('width-chars', 10)
-        cell2 = gtk.CellRendererToggle()
-        cell2.set_property('activatable', True)
-        cell2.connect("toggled", self.pkgfmt_widget_toggle_cb, pkgfmt_store, 2)
-        col.pack_start(cell, True)
-        col1.pack_start(cell1, True)
-        col2.pack_end(cell2, True)
-        col.set_attributes(cell, text=0)
-        col1.set_attributes(cell1, text=1)
-        col2.set_attributes(cell2, active=2)
+        label = self.gen_label_widget("Root file system package format")
+        rootfs_vbox.pack_start(label, expand=False, fill=False)
 
-        pkgfmt_store.set_sort_func(0, self.pkgfmt_widget_sort_func, None)
-        pkgfmt_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        rootfs_format = ""
+        if curr_package_format:
+            rootfs_format = curr_package_format.split()[0]
 
-        scroll = gtk.ScrolledWindow()
-        scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
-        scroll.set_shadow_type(gtk.SHADOW_IN)
-        scroll.add(pkgfmt_tree)
-        scroll.set_size_request(200,60)
-        pkgfmt_hbox.pack_start(scroll, False, False, 0)
+        tooltip = "Package format that is used to generate rootfs"
+        rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip)
+        rootfs_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
 
-        vbox = gtk.VBox(False, 6)
-        pkgfmt_hbox.pack_start(vbox, False, False, 15)
+        extra_vbox = gtk.VBox(False, 6)
+        pkgfmt_hbox.pack_start(extra_vbox, expand=False, fill=False)
 
-        up = gtk.Button()
-        image = gtk.Image()
-        image.set_from_stock(gtk.STOCK_GO_UP, gtk.ICON_SIZE_MENU)
-        up.set_image(image)
-        up.set_size_request(50,30)
-        up.connect("clicked", self.pkgfmt_widget_up_clicked_cb, tree_selection)
-        vbox.pack_start(up, False, False, 5)
+        label = self.gen_label_widget("Additional package formats")
+        extra_vbox.pack_start(label, expand=False, fill=False)
 
-        down = gtk.Button()
-        image = gtk.Image()
-        image.set_from_stock(gtk.STOCK_GO_DOWN, gtk.ICON_SIZE_MENU)
-        down.set_image(image)
-        down.set_size_request(50,30)
-        down.connect("clicked", self.pkgfmt_widget_down_clicked_cb, tree_selection)
-        vbox.pack_start(down, False, False, 5)
-        tree_selection.connect("changed", self.pkgfmt_widget_tree_selection_changed_cb, up, down)
+        check_hbox = gtk.HBox(False, 12)
+        extra_vbox.pack_start(check_hbox, expand=False, fill=False)
+        for format in all_package_format:
+            if format != rootfs_format:
+                check_button = gtk.CheckButton(format)
+                is_active = (format in curr_package_format.split())
+                check_button.set_active(is_active)
+                check_hbox.pack_start(check_button, expand=False, fill=False)
 
+        tooltip = "Extra package formats to build"
         info = HobInfoButton(tooltip, self)
-        pkgfmt_hbox.pack_start(info, expand=False, fill=False)
+        check_hbox.pack_end(info, expand=False, fill=False)
+
+        rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
 
         pkgfmt_hbox.show_all()
 
-        return pkgfmt_hbox, pkgfmt_store
+        return pkgfmt_hbox, rootfs_combo, check_hbox
 
     def editable_settings_cell_edited(self, cell, path_string, new_text, model):
         it = model.get_iter_from_string(path_string)
@@ -431,7 +343,6 @@ class AdvancedSettingDialog (CrumbsDialog):
         self.max_threads = max_threads
 
         # class members for internal use
-        self.pkgfmt_store = None
         self.distro_combo = None
         self.dldir_text = None
         self.sstatedir_text = None
@@ -509,7 +420,7 @@ class AdvancedSettingDialog (CrumbsDialog):
         label = self.gen_label_widget("<span weight=\"bold\">Packaging Format:</span>")
         tooltip = "Select package formats that will be used. "
         tooltip += "The first format will be used for final image"
-        pkgfmt_widget, self.pkgfmt_store = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip)
+        pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip)
         sub_vbox.pack_start(label, expand=False, fill=False)
         sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
 
@@ -621,14 +532,12 @@ class AdvancedSettingDialog (CrumbsDialog):
     def response_cb(self, dialog, response_id):
         self.variables = {}
 
-        self.configuration.curr_package_format = ""
-        it = self.pkgfmt_store.get_iter_first()
-        while it:
-            value = self.pkgfmt_store.get_value(it, 2)
-            if value:
-                self.configuration.curr_package_format += (self.pkgfmt_store.get_value(it, 1) + " ")
-            it = self.pkgfmt_store.iter_next(it)
-        self.configuration.curr_package_format = self.configuration.curr_package_format.strip()
+        package_format = []
+        package_format.append(self.rootfs_combo.get_active_text())
+        for child in self.check_hbox:
+            if isinstance(child, gtk.CheckButton) and child.get_active():
+                package_format.append(child.get_label())
+        self.configuration.curr_package_format = " ".join(package_format)
         self.variables["PACKAGE_FORMAT"] = self.configuration.curr_package_format
 
         self.configuration.curr_distro = self.distro_combo.get_active_text()
-- 
1.7.4.1




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

* [PATCH 05/17] Hob: Change template button name from "Template" to "Templates"
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (3 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 04/17] Hob: change package classes selection GUI Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 06/17] command.py: Change parseConfigurationFiles API from async to sync Dongxiao Xu
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Change the button name according to UI team's design.

This fixes [YOCTO #2126]

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

diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index b0c5daa..076b2c0 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -46,7 +46,7 @@ class ImageConfigurationPage (HobPage):
         self.toolbar.set_style(gtk.TOOLBAR_BOTH)
 
         template_button = self.append_toolbar_button(self.toolbar,
-            "Template",
+            "Templates",
             hic.ICON_TEMPLATES_DISPLAY_FILE,
             hic.ICON_TEMPLATES_HOVER_FILE,
             "Load a hob building template saved before",
-- 
1.7.4.1




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

* [PATCH 06/17] command.py: Change parseConfigurationFiles API from async to sync
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (4 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 05/17] Hob: Change template button name from "Template" to "Templates" Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 07/17] process.py: Increase the timeout value for polling commands Dongxiao Xu
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

parseConfigurationFiles will not cost much time and move it to the
CommandSync class.

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

diff --git a/lib/bb/command.py b/lib/bb/command.py
index 1799f1c..febc90f 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -186,6 +186,14 @@ class CommandsSync:
         event = params[0]
         bb.event.fire(eval(event), command.cooker.configuration.data)
 
+    def parseConfigurationFiles(self, command, params):
+        """
+        Parse the configuration files
+        """
+        prefiles = params[0]
+        postfiles = params[1]
+        command.cooker.parseConfigurationFiles(prefiles, postfiles)
+
 class CommandsAsync:
     """
     A class of asynchronous commands
@@ -350,12 +358,3 @@ class CommandsAsync:
             command.finishAsyncCommand()
     compareRevisions.needcache = True
 
-    def parseConfigurationFiles(self, command, params):
-        """
-        Parse the configuration files
-        """
-        prefiles = params[0]
-        postfiles = params[1]
-        command.cooker.parseConfigurationFiles(prefiles, postfiles)
-        command.finishAsyncCommand()
-    parseConfigurationFiles.needcache = False
-- 
1.7.4.1




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

* [PATCH 07/17] process.py: Increase the timeout value for polling commands
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (5 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 06/17] command.py: Change parseConfigurationFiles API from async to sync Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 08/17] Hob: Change parseConfigurationFiles API usage Dongxiao Xu
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

The parseConfigurationFiles commands needs more time for piping,
thus change the polling timeout value from 0.5s to 1s.

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

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index ba91336..946af05 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -45,7 +45,7 @@ class ServerCommunicator():
         while True:
             # don't let the user ctrl-c while we're waiting for a response
             try:
-                if self.connection.poll(.5):
+                if self.connection.poll(1):
                     return self.connection.recv()
                 else:
                     return None
-- 
1.7.4.1




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

* [PATCH 08/17] Hob: Change parseConfigurationFiles API usage
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (6 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 07/17] process.py: Increase the timeout value for polling commands Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 09/17] Hob: Fix the workaround to get image types Dongxiao Xu
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

parseConfigurationFiles API is changed to sync mode, therefore make
accordingly changes in Hob part.

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

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 07cc039..e9d10c5 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -62,7 +62,7 @@ class HobHandler(gobject.GObject):
                                      (gobject.TYPE_PYOBJECT,)),
     }
 
-    (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_CONFIG, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(13)
+    (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(12)
     (LAYERS_REFRESH, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5)
 
     def __init__(self, server, recipe_model, package_model):
@@ -134,8 +134,6 @@ class HobHandler(gobject.GObject):
             self.server.runCommand(["findConfigFiles", "MACHINE-SDK"])
         elif next_command == self.FILES_MATCH_CLASS:
             self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
-        elif next_command == self.PARSE_CONFIG:
-            self.server.runCommand(["parseConfigurationFiles", "", ""])
         elif next_command == self.PARSE_BBFILES:
             self.server.runCommand(["parseFiles"])
         elif next_command == self.GENERATE_TGTS:
@@ -265,10 +263,13 @@ class HobHandler(gobject.GObject):
     def init_cooker(self):
         self.server.runCommand(["initCooker"])
 
+    def parse_config(self):
+        self.server.runCommand(["parseConfigurationFiles", "", ""])
+
     def refresh_layers(self, bblayers):
         self.server.runCommand(["initCooker"])
         self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
-        self.commands_async.append(self.PARSE_CONFIG)
+        self.parse_config()
         self.commands_async.append(self.CFG_FILES_DISTRO)
         self.commands_async.append(self.CFG_FILES_MACH)
         self.commands_async.append(self.CFG_FILES_SDKMACH)
@@ -336,7 +337,7 @@ class HobHandler(gobject.GObject):
         self.run_next_command(self.POPULATE_PACKAGEINFO)
 
     def generate_recipes(self):
-        self.commands_async.append(self.PARSE_CONFIG)
+        self.parse_config()
         self.commands_async.append(self.GENERATE_TGTS)
         self.run_next_command(self.GENERATE_RECIPES)
                  
@@ -344,7 +345,7 @@ class HobHandler(gobject.GObject):
         targets = []
         targets.extend(tgts)
         self.recipe_queue = targets
-        self.commands_async.append(self.PARSE_CONFIG)
+        self.parse_config()
         self.commands_async.append(self.PARSE_BBFILES)
         self.commands_async.append(self.BUILD_TARGET_RECIPES)
         self.run_next_command(self.GENERATE_PACKAGES)
@@ -352,7 +353,7 @@ class HobHandler(gobject.GObject):
     def generate_image(self, tgts, toolchain_build=False):
         self.package_queue = tgts
         self.toolchain_build = toolchain_build
-        self.commands_async.append(self.PARSE_CONFIG)
+        self.parse_config()
         self.commands_async.append(self.PARSE_BBFILES)
         self.commands_async.append(self.BUILD_TARGET_IMAGE)
         self.run_next_command(self.GENERATE_IMAGE)
-- 
1.7.4.1




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

* [PATCH 09/17] Hob: Fix the workaround to get image types
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (7 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 08/17] Hob: Change parseConfigurationFiles API usage Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 10/17] Hob: Change recipe selection tab order Dongxiao Xu
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Inherit image_types.bbclass before getting parameters to fix the
original workaround.

Besides, kick the handler things off after Builder is initialized.

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

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index e9d10c5..fe7b5d5 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -379,6 +379,11 @@ class HobHandler(gobject.GObject):
         self.build.reset()
 
     def get_parameters(self):
+        # inherit image_types.bbclass
+        self.init_cooker()
+        self.set_extra_inherit("image_types")
+        self.parse_config()
+    
         # retrieve the parameters from bitbake
         params = {}
         params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
@@ -444,8 +449,7 @@ class HobHandler(gobject.GObject):
 
         params["image_fstypes"] = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or ""
 
-        # walkaround
-        params["image_types"] = " ".join(hcc.SUPPORTED_IMAGE_TYPES.keys()).lstrip(" ")
+        params["image_types"] = self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or ""
 
         params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or ""
         params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index daa708b..4c3e572 100755
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -56,9 +56,10 @@ def main (server = None, eventHandler = None):
     package_model = PackageListModel()
 
     hobHandler = HobHandler(server, recipe_model, package_model)
+    builder = Builder(hobHandler, recipe_model, package_model)
+
     if hobHandler.kick() == False:
         return 1
-    builder = Builder(hobHandler, recipe_model, package_model)
 
     # This timeout function regularly probes the event queue to find out if we
     # have any messages waiting for us.
-- 
1.7.4.1




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

* [PATCH 10/17] Hob: Change recipe selection tab order
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (8 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 09/17] Hob: Fix the workaround to get image types Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 11/17] Hob: Change package " Dongxiao Xu
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

In the recipe screen, change the tab order to be:
"Included", "All recipes", and "Tasks".

Also change some description name in tab.

This fixes [YOCTO #2110]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 lib/bb/ui/crumbs/recipeselectionpage.py |   48 +++++++++++++++---------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index 6dd7c1e..ceaf5f5 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -33,26 +33,21 @@ from bb.ui.crumbs.hobpages import HobPage
 class RecipeSelectionPage (HobPage):
     pages = [
         {
-         'name'    : 'Recipe',
-         'filter'  : { RecipeListModel.COL_TYPE : ['recipe'] },
+         'name'    : 'Included',
+         'filter'  : { RecipeListModel.COL_INC  : [True],
+                       RecipeListModel.COL_TYPE : ['recipe', 'task'] },
          'columns' : [{
-                       'col_name' : 'Recipe',
+                       'col_name' : 'Recipe Name',
                        'col_id'   : RecipeListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
                        'col_max'  : 400
                       }, {
-                       'col_name' : 'License',
-                       'col_id'   : RecipeListModel.COL_LIC,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400
-                      }, {
-                       'col_name' : 'Group',
-                       'col_id'   : RecipeListModel.COL_GROUP,
+                       'col_name' : 'Brought in by',
+                       'col_id'   : RecipeListModel.COL_BINB,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 500
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : RecipeListModel.COL_INC,
@@ -61,17 +56,23 @@ class RecipeSelectionPage (HobPage):
                        'col_max'  : 50
                       }]
         }, {
-         'name'    : 'Recipe Collection',
-         'filter'  : { RecipeListModel.COL_TYPE : ['task'] },
+         'name'    : 'All recipes',
+         'filter'  : { RecipeListModel.COL_TYPE : ['recipe'] },
          'columns' : [{
-                       'col_name' : 'Recipe Collection',
+                       'col_name' : 'Recipe Name',
                        'col_id'   : RecipeListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
                        'col_max'  : 400
                       }, {
-                       'col_name' : 'Description',
-                       'col_id'   : RecipeListModel.COL_DESC,
+                       'col_name' : 'License',
+                       'col_id'   : RecipeListModel.COL_LIC,
+                       'col_style': 'text',
+                       'col_min'  : 100,
+                       'col_max'  : 400
+                      }, {
+                       'col_name' : 'Group',
+                       'col_id'   : RecipeListModel.COL_GROUP,
                        'col_style': 'text',
                        'col_min'  : 100,
                        'col_max'  : 400
@@ -83,21 +84,20 @@ class RecipeSelectionPage (HobPage):
                        'col_max'  : 50
                       }]
         }, {
-         'name'    : 'Included',
-         'filter'  : { RecipeListModel.COL_INC  : [True],
-                       RecipeListModel.COL_TYPE : ['recipe', 'task'] },
+         'name'    : 'Tasks',
+         'filter'  : { RecipeListModel.COL_TYPE : ['task'] },
          'columns' : [{
-                       'col_name' : 'Recipe',
+                       'col_name' : 'Task Name',
                        'col_id'   : RecipeListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
                        'col_max'  : 400
                       }, {
-                       'col_name' : 'Brought by',
-                       'col_id'   : RecipeListModel.COL_BINB,
+                       'col_name' : 'Description',
+                       'col_id'   : RecipeListModel.COL_DESC,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 500
+                       'col_max'  : 400
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : RecipeListModel.COL_INC,
-- 
1.7.4.1




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

* [PATCH 11/17] Hob: Change package selection tab order
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (9 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 10/17] Hob: Change recipe selection tab order Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 12/17] Hob: Move "Create your own image" to the bottom of image list Dongxiao Xu
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

In the package screen, change the tab order to be:
"Included" and "All packages".

Also change some descriptions in tab.

This fixes [YOCTO #2111]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 lib/bb/ui/crumbs/packageselectionpage.py |   40 +++++++++++++++---------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index 23e460c..32e438c 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -34,55 +34,55 @@ class PackageSelectionPage (HobPage):
 
     pages = [
         {
-         'name'    : 'All packages',
-         'filter'  : {},
+         'name'    : 'Included',
+         'filter'  : { PackageListModel.COL_INC : [True] },
          'columns' : [{
-                       'col_name' : 'Name',
+                       'col_name' : 'Package Name',
                        'col_id'   : PackageListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 400
+                       'col_max'  : 300
                       }, {
-                       'col_name' : 'size',
+                       'col_name' : 'Brought in by',
+                       'col_id'   : PackageListModel.COL_BINB,
+                       'col_style': 'text',
+                       'col_min'  : 100,
+                       'col_max'  : 350
+                      }, {
+                       'col_name' : 'Size',
                        'col_id'   : PackageListModel.COL_SIZE,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 500
+                       'col_max'  : 300
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : PackageListModel.COL_INC,
                        'col_style': 'check toggle',
                        'col_min'  : 50,
                        'col_max'  : 50
-                      }]
+                     }]
         }, {
-         'name'    : 'Included',
-         'filter'  : { PackageListModel.COL_INC : [True] },
+         'name'    : 'All packages',
+         'filter'  : {},
          'columns' : [{
-                       'col_name' : 'Name',
+                       'col_name' : 'Package Name',
                        'col_id'   : PackageListModel.COL_NAME,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 300
-                      }, {
-                       'col_name' : 'Brought by',
-                       'col_id'   : PackageListModel.COL_BINB,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 350
+                       'col_max'  : 400
                       }, {
-                       'col_name' : 'size',
+                       'col_name' : 'Size',
                        'col_id'   : PackageListModel.COL_SIZE,
                        'col_style': 'text',
                        'col_min'  : 100,
-                       'col_max'  : 300
+                       'col_max'  : 500
                       }, {
                        'col_name' : 'Included',
                        'col_id'   : PackageListModel.COL_INC,
                        'col_style': 'check toggle',
                        'col_min'  : 50,
                        'col_max'  : 50
-                     }]
+                      }]
         }
     ]
 
-- 
1.7.4.1




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

* [PATCH 12/17] Hob: Move "Create your own image" to the bottom of image list
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (10 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 11/17] Hob: Change package " Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 13/17] Hob: Change window title from HOB to Hob Dongxiao Xu
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Move "Create your own image" item to the bottom of base image list.
Besides, remove an un-used hob list entry.

This fixes [YOCTO #2104]

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

diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 74b2a17..61f2911 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -412,7 +412,7 @@ class RecipeListModel(gtk.ListStore):
     """
     (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11)
 
-    __dummy_image__ = "Start from scratch"
+    __dummy_image__ = "Create your own image"
 
     __gsignals__ = {
         "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
@@ -434,7 +434,6 @@ class RecipeListModel(gtk.ListStore):
                                 gobject.TYPE_BOOLEAN,
                                 gobject.TYPE_BOOLEAN,
                                 gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
                                 gobject.TYPE_STRING)
 
     """
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 076b2c0..b0f0213 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -330,12 +330,15 @@ class ImageConfigurationPage (HobPage):
         # append and set active
         while it:
             path = image_model.get_path(it)
+            it = image_model.iter_next(it)
             image_name = image_model[path][recipe_model.COL_NAME]
+            if image_name == self.builder.recipe_model.__dummy_image__:
+                continue
             self.image_combo.append_text(image_name)
             if image_name == selected_image:
                 active = cnt
-            it = image_model.iter_next(it)
             cnt = cnt + 1
+        self.image_combo.append_text(self.builder.recipe_model.__dummy_image__)
         self._image_combo_connect_signal()
 
         self.image_combo.set_active(-1)
-- 
1.7.4.1




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

* [PATCH 13/17] Hob: Change window title from HOB to Hob
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (11 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 12/17] Hob: Move "Create your own image" to the bottom of image list Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 14/17] Hob: Change "View Packages" description Dongxiao Xu
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

From: Shane Wang <shane.wang@intel.com>

[Yocto #2147]

Signed-off-by: Shane Wang <shane.wang@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 d3b13c9..5a292e7 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -227,7 +227,7 @@ class Builder(gtk.Window):
         self.switch_page(self.MACHINE_SELECTION)
 
     def create_visual_elements(self):
-        self.set_title("Hob - Image Creator")
+        self.set_title("Hob")
         self.set_icon_name("applications-development")
         self.set_resizable(True)
         window_width = self.get_screen().get_width()
-- 
1.7.4.1




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

* [PATCH 14/17] Hob: Change "View Packages" description
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (12 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 13/17] Hob: Change window title from HOB to Hob Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 15/17] Hob: Change the titles for recipe view and package view Dongxiao Xu
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

From: Shane Wang <shane.wang@intel.com>

Change 'View Packages' button description from 'Add/remove packages' to 'Add/remove previously built packages to/from your image'.
And we adjust the size to make "View Packages" button fit into the window.

[Yocto #2146]

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 lib/bb/ui/crumbs/imageconfigurationpage.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index b0f0213..c1372ad 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -200,7 +200,7 @@ class ImageConfigurationPage (HobPage):
         icon_file = hic.ICON_PACKAGES_DISPLAY_FILE
         hover_file = hic.ICON_PACKAGES_HOVER_FILE
         self.view_packages_button = HobXpmLabelButtonBox(icon_file, hover_file,
-            "View Packages", "Add/remove packages")
+            "View Packages", "Add/remove previously built packages to/from your image")
         self.view_packages_button.connect("button-release-event", self.view_packages_button_clicked_cb)
 
         self.image_separator = gtk.HSeparator()
@@ -213,8 +213,8 @@ class ImageConfigurationPage (HobPage):
         self.gtable.attach(self.image_separator, 0, 40, 35, 36)
 
     def set_rcppkg_layout(self):
-        self.gtable.attach(self.view_recipes_button, 0, 20, 28, 32)
-        self.gtable.attach(self.view_packages_button, 20, 40, 28, 32)
+        self.gtable.attach(self.view_recipes_button, 0, 18, 28, 32)
+        self.gtable.attach(self.view_packages_button, 18, 40, 28, 32)
 
     def create_config_build_button(self):
         # Create the "Build packages" and "Just bake" buttons at the bottom
-- 
1.7.4.1




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

* [PATCH 15/17] Hob: Change the titles for recipe view and package view
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (13 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 14/17] Hob: Change "View Packages" description Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 16/17] cooker: add inherit information when generating package tree Dongxiao Xu
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

From: Shane Wang <shane.wang@intel.com>

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 lib/bb/ui/crumbs/packageselectionpage.py |    2 +-
 lib/bb/ui/crumbs/recipeselectionpage.py  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index 32e438c..e2c76cc 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -87,7 +87,7 @@ class PackageSelectionPage (HobPage):
     ]
 
     def __init__(self, builder):
-        super(PackageSelectionPage, self).__init__(builder, "Package Selection")
+        super(PackageSelectionPage, self).__init__(builder, "Packages")
 
         # set invisiable members
         self.package_model = self.builder.package_model
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index ceaf5f5..2e5b727 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -109,7 +109,7 @@ class RecipeSelectionPage (HobPage):
     ]
 
     def __init__(self, builder = None):
-        super(RecipeSelectionPage, self).__init__(builder, "Recipe Selection")
+        super(RecipeSelectionPage, self).__init__(builder, "Recipes")
 
         # set invisiable members
         self.recipe_model = self.builder.recipe_model
-- 
1.7.4.1




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

* [PATCH 16/17] cooker: add inherit information when generating package tree
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (14 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 15/17] Hob: Change the titles for recipe view and package view Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-21 12:55 ` [PATCH 17/17] Hob: Use inherit information to judge if a recipe is image type Dongxiao Xu
  2012-03-22  0:59 ` [PATCH 00/17][PULL] Hob: Bunch of bug fixes Joshua Lock
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Inherit information could be used to judge if a recipe is image type
or not.

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

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index a000f72..74cda1f 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -471,6 +471,7 @@ class BBCooker:
             description = self.status.description[fn]
             rdepends = self.status.rundeps[fn]
             rrecs = self.status.runrecs[fn]
+            inherits = self.status.inherits.get(fn, None)
             if pn not in depend_tree["pn"]:
                 depend_tree["pn"][pn] = {}
                 depend_tree["pn"][pn]["filename"] = fn
@@ -479,6 +480,7 @@ class BBCooker:
                 depend_tree["pn"][pn]["license"] = lic
                 depend_tree["pn"][pn]["section"] = section
                 depend_tree["pn"][pn]["description"] = description
+                depend_tree["pn"][pn]["inherits"] = inherits
 
             if fnid not in seen_fnids:
                 seen_fnids.append(fnid)
-- 
1.7.4.1




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

* [PATCH 17/17] Hob: Use inherit information to judge if a recipe is image type
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (15 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 16/17] cooker: add inherit information when generating package tree Dongxiao Xu
@ 2012-03-21 12:55 ` Dongxiao Xu
  2012-03-22  0:59 ` [PATCH 00/17][PULL] Hob: Bunch of bug fixes Joshua Lock
  17 siblings, 0 replies; 23+ messages in thread
From: Dongxiao Xu @ 2012-03-21 12:55 UTC (permalink / raw)
  To: bitbake-devel

Previously we use pattern "-image-" to match recipe name to judge if
it is image type. This will ignore some images whose name doesn't
match the pattern. The new method is to use the inherit information,
that is, if a recipe inherits image.bbclass, we treat it as an image.

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

diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 61f2911..bfd49bd 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -528,6 +528,7 @@ class RecipeListModel(gtk.ListStore):
             desc = event_model["pn"][item]["description"]
             lic = event_model["pn"][item]["license"]
             group = event_model["pn"][item]["section"]
+            inherits = event_model["pn"][item]["inherits"]
             install = []
 
             depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
@@ -537,9 +538,10 @@ class RecipeListModel(gtk.ListStore):
                     atype = 'mltask'
                 else:
                     atype = 'task'
-            elif ('-image-' in name):
-                atype = 'image'
-                install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
+            elif ('image.bbclass' in " ".join(inherits)):
+                if name != "hob-image":
+                    atype = 'image'
+                    install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
             elif ('meta-' in name):
                 atype = 'toolchain'
             elif (name == 'dummy-image' or name == 'dummy-toolchain'):
-- 
1.7.4.1




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

* Re: [PATCH 00/17][PULL] Hob: Bunch of bug fixes
  2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
                   ` (16 preceding siblings ...)
  2012-03-21 12:55 ` [PATCH 17/17] Hob: Use inherit information to judge if a recipe is image type Dongxiao Xu
@ 2012-03-22  0:59 ` Joshua Lock
  2012-03-22  1:21   ` Xu, Dongxiao
  17 siblings, 1 reply; 23+ messages in thread
From: Joshua Lock @ 2012-03-22  0:59 UTC (permalink / raw)
  To: bitbake-devel



On 21/03/12 05:55, Dongxiao Xu wrote:
> Hi Richard,
>
> This pull request is Hob related bug fixes. Please help to review and pull.
>
> Thanks,
> Dongxiao
>
> The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:
>
>    Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
>
> Dongxiao Xu (14):
>    Hob: Still use initcmd != None as the if judgement
>    Hob: Remove split model in GTK Hob
>    cooker: terminate each process when quitting recipe parsing
>    Hob: change package classes selection GUI
>    Hob: Change template button name from "Template" to "Templates"

These all look fine.

>    command.py: Change parseConfigurationFiles API from async to sync
>    process.py: Increase the timeout value for polling commands
>    Hob: Change parseConfigurationFiles API usage

Can you explain some of the reasoning behind this set of changes? If the 
command truly belongs as an asynchronous one I'm not sure why we need to 
increase the timeout duration specifically for it.

>    Hob: Fix the workaround to get image types
>    Hob: Change recipe selection tab order
>    Hob: Change package selection tab order
>    Hob: Move "Create your own image" to the bottom of image list
>    cooker: add inherit information when generating package tree
>    Hob: Use inherit information to judge if a recipe is image type
>
> Shane Wang (3):
>    Hob: Change window title from HOB to Hob
>    Hob: Change "View Packages" description
>    Hob: Change the titles for recipe view and package view

These also look OK to me.

Cheers,
Joshua
-- 
Joshua '贾詡' Lock
         Yocto Project "Johannes factotum"
         Intel Open Source Technology Centre



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

* Re: [PATCH 00/17][PULL] Hob: Bunch of bug fixes
  2012-03-22  0:59 ` [PATCH 00/17][PULL] Hob: Bunch of bug fixes Joshua Lock
@ 2012-03-22  1:21   ` Xu, Dongxiao
  2012-03-22 22:32     ` Joshua Lock
  0 siblings, 1 reply; 23+ messages in thread
From: Xu, Dongxiao @ 2012-03-22  1:21 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Wed, 2012-03-21 at 17:59 -0700, Joshua Lock wrote:
> 
> On 21/03/12 05:55, Dongxiao Xu wrote:
> > Hi Richard,
> >
> > This pull request is Hob related bug fixes. Please help to review and pull.
> >
> > Thanks,
> > Dongxiao
> >
> > The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:
> >
> >    Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)
> >
> > are available in the git repository at:
> >    git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
> >    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
> >
> > Dongxiao Xu (14):
> >    Hob: Still use initcmd != None as the if judgement
> >    Hob: Remove split model in GTK Hob
> >    cooker: terminate each process when quitting recipe parsing
> >    Hob: change package classes selection GUI
> >    Hob: Change template button name from "Template" to "Templates"
> 
> These all look fine.
> 
> >    command.py: Change parseConfigurationFiles API from async to sync
> >    process.py: Increase the timeout value for polling commands
> >    Hob: Change parseConfigurationFiles API usage
> 
> Can you explain some of the reasoning behind this set of changes? If the 
> command truly belongs as an asynchronous one I'm not sure why we need to 
> increase the timeout duration specifically for it.
> 
> >    Hob: Fix the workaround to get image types

Hi Josh,

Actually the above three patches are preparations for this commit: "Hob:
Fix the workaround to get image types".

The background is that, we need to add extra inherits of
image_types.bbclass before parsing configuration files and getting
variables values. Therefore the modified code piece is something like:

def get_parameters(self):
    self.init_cooker()
    self.set_extra_inherits("image_types")
    self.parse_config()

    self.server.runCommand(["getVariable", "MACHINE"])
    ...

We can see from above code is that, the parse_config locates between two
SYNC commands (set_extra_inherits and getVariable). Therefore we also
need the parse_config to be a SYNC command.

As far as I know the parseConfigurationFiles API doesn't cost too much
time (should less than 1s), so that's the reason why I change it to SYNC
mode.

The increase of time duration for parseConfigurationFiles is that, the
process server use pipe mode to pass object (function) from one to
another. The original 0.5 second timeout isn't enough for transferring
"parseConfigurationFiles" object, the phenomenon is that on certain
machines, the runCommand result is messed up with wrong values. This
issue doesn't exist with xmlrpc server.

Thanks,
Dongxiao


> >    Hob: Change recipe selection tab order
> >    Hob: Change package selection tab order
> >    Hob: Move "Create your own image" to the bottom of image list
> >    cooker: add inherit information when generating package tree
> >    Hob: Use inherit information to judge if a recipe is image type
> >
> > Shane Wang (3):
> >    Hob: Change window title from HOB to Hob
> >    Hob: Change "View Packages" description
> >    Hob: Change the titles for recipe view and package view
> 
> These also look OK to me.
> 
> Cheers,
> Joshua





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

* Re: [PATCH 00/17][PULL] Hob: Bunch of bug fixes
  2012-03-22  1:21   ` Xu, Dongxiao
@ 2012-03-22 22:32     ` Joshua Lock
  2012-03-22 23:33       ` Richard Purdie
  0 siblings, 1 reply; 23+ messages in thread
From: Joshua Lock @ 2012-03-22 22:32 UTC (permalink / raw)
  To: Xu, Dongxiao; +Cc: bitbake-devel

On 21/03/12 18:21, Xu, Dongxiao wrote:
> On Wed, 2012-03-21 at 17:59 -0700, Joshua Lock wrote:
>>
>> On 21/03/12 05:55, Dongxiao Xu wrote:
>>> Hi Richard,
>>>
>>> This pull request is Hob related bug fixes. Please help to review and pull.
>>>
>>> Thanks,
>>> Dongxiao
>>>
>>> The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:
>>>
>>>     Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)
>>>
>>> are available in the git repository at:
>>>     git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
>>>     http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
>>>
>>> Dongxiao Xu (14):
>>>     Hob: Still use initcmd != None as the if judgement
>>>     Hob: Remove split model in GTK Hob
>>>     cooker: terminate each process when quitting recipe parsing
>>>     Hob: change package classes selection GUI
>>>     Hob: Change template button name from "Template" to "Templates"
>>
>> These all look fine.
>>
>>>     command.py: Change parseConfigurationFiles API from async to sync
>>>     process.py: Increase the timeout value for polling commands
>>>     Hob: Change parseConfigurationFiles API usage
>>
>> Can you explain some of the reasoning behind this set of changes? If the
>> command truly belongs as an asynchronous one I'm not sure why we need to
>> increase the timeout duration specifically for it.
>>
>>>     Hob: Fix the workaround to get image types
>
> Hi Josh,
>
> Actually the above three patches are preparations for this commit: "Hob:
> Fix the workaround to get image types".
>
> The background is that, we need to add extra inherits of
> image_types.bbclass before parsing configuration files and getting
> variables values. Therefore the modified code piece is something like:
>
> def get_parameters(self):
>      self.init_cooker()
>      self.set_extra_inherits("image_types")
>      self.parse_config()
>
>      self.server.runCommand(["getVariable", "MACHINE"])
>      ...
>
> We can see from above code is that, the parse_config locates between two
> SYNC commands (set_extra_inherits and getVariable). Therefore we also
> need the parse_config to be a SYNC command.
>
> As far as I know the parseConfigurationFiles API doesn't cost too much
> time (should less than 1s), so that's the reason why I change it to SYNC
> mode.
>
> The increase of time duration for parseConfigurationFiles is that, the
> process server use pipe mode to pass object (function) from one to
> another. The original 0.5 second timeout isn't enough for transferring
> "parseConfigurationFiles" object, the phenomenon is that on certain
> machines, the runCommand result is messed up with wrong values. This
> issue doesn't exist with xmlrpc server.

OK, I understand what you're trying to achieve. I'm afraid I'm not 
convinced that we need to make such an invasive change though. Any 
reason we can't re-order the initialisation so that everything is done 
after the async parseConfigurationFiles?

I'm nervous of us pushing the 0.5s->1s change this late in the cycle. 
Have you any indication of whether it affects builds using knotty?

Just to be clear I think Richard needs to ack/nack this change to core 
BitBake. The Hob changes related to it are fine by me.

Cheers,
Joshua
-- 
Joshua '贾詡' Lock
         Yocto Project "Johannes factotum"
         Intel Open Source Technology Centre



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

* Re: [PATCH 00/17][PULL] Hob: Bunch of bug fixes
  2012-03-22 22:32     ` Joshua Lock
@ 2012-03-22 23:33       ` Richard Purdie
  2012-03-23  3:41         ` Xu, Dongxiao
  0 siblings, 1 reply; 23+ messages in thread
From: Richard Purdie @ 2012-03-22 23:33 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Thu, 2012-03-22 at 15:32 -0700, Joshua Lock wrote:
> On 21/03/12 18:21, Xu, Dongxiao wrote:
> > On Wed, 2012-03-21 at 17:59 -0700, Joshua Lock wrote:
> >>
> >> On 21/03/12 05:55, Dongxiao Xu wrote:
> >>> Hi Richard,
> >>>
> >>> This pull request is Hob related bug fixes. Please help to review and pull.
> >>>
> >>> Thanks,
> >>> Dongxiao
> >>>
> >>> The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:
> >>>
> >>>     Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)
> >>>
> >>> are available in the git repository at:
> >>>     git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
> >>>     http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
> >>>
> >>> Dongxiao Xu (14):
> >>>     Hob: Still use initcmd != None as the if judgement
> >>>     Hob: Remove split model in GTK Hob
> >>>     cooker: terminate each process when quitting recipe parsing
> >>>     Hob: change package classes selection GUI
> >>>     Hob: Change template button name from "Template" to "Templates"
> >>
> >> These all look fine.
> >>
> >>>     command.py: Change parseConfigurationFiles API from async to sync
> >>>     process.py: Increase the timeout value for polling commands
> >>>     Hob: Change parseConfigurationFiles API usage
> >>
> >> Can you explain some of the reasoning behind this set of changes? If the
> >> command truly belongs as an asynchronous one I'm not sure why we need to
> >> increase the timeout duration specifically for it.
> >>
> >>>     Hob: Fix the workaround to get image types
> >
> > Hi Josh,
> >
> > Actually the above three patches are preparations for this commit: "Hob:
> > Fix the workaround to get image types".
> >
> > The background is that, we need to add extra inherits of
> > image_types.bbclass before parsing configuration files and getting
> > variables values. Therefore the modified code piece is something like:
> >
> > def get_parameters(self):
> >      self.init_cooker()
> >      self.set_extra_inherits("image_types")
> >      self.parse_config()
> >
> >      self.server.runCommand(["getVariable", "MACHINE"])
> >      ...
> >
> > We can see from above code is that, the parse_config locates between two
> > SYNC commands (set_extra_inherits and getVariable). Therefore we also
> > need the parse_config to be a SYNC command.
> >
> > As far as I know the parseConfigurationFiles API doesn't cost too much
> > time (should less than 1s), so that's the reason why I change it to SYNC
> > mode.
> >
> > The increase of time duration for parseConfigurationFiles is that, the
> > process server use pipe mode to pass object (function) from one to
> > another. The original 0.5 second timeout isn't enough for transferring
> > "parseConfigurationFiles" object, the phenomenon is that on certain
> > machines, the runCommand result is messed up with wrong values. This
> > issue doesn't exist with xmlrpc server.
> 
> OK, I understand what you're trying to achieve. I'm afraid I'm not 
> convinced that we need to make such an invasive change though. Any 
> reason we can't re-order the initialisation so that everything is done 
> after the async parseConfigurationFiles?
> 
> I'm nervous of us pushing the 0.5s->1s change this late in the cycle. 
> Have you any indication of whether it affects builds using knotty?
> 
> Just to be clear I think Richard needs to ack/nack this change to core 
> BitBake. The Hob changes related to it are fine by me.

Having a sync command blocking the system for over 1 second isn't right.
Sync commands are meant to be fast (say 0.01s max) and this obviously
isn't.

I'm rather concerned about this and it suggests something is wrong with
hob's init/state code to be honest.

My suggestion would be to add an extra parameter to self.parse_config()
so you can set other classes to inherit (and variables to set). You will
still have to then read MACHINE later but I think that is reasonable.

Cheers,

Richard






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

* Re: [PATCH 00/17][PULL] Hob: Bunch of bug fixes
  2012-03-22 23:33       ` Richard Purdie
@ 2012-03-23  3:41         ` Xu, Dongxiao
  0 siblings, 0 replies; 23+ messages in thread
From: Xu, Dongxiao @ 2012-03-23  3:41 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

On Thu, 2012-03-22 at 23:33 +0000, Richard Purdie wrote:
> On Thu, 2012-03-22 at 15:32 -0700, Joshua Lock wrote:
> > On 21/03/12 18:21, Xu, Dongxiao wrote:
> > > On Wed, 2012-03-21 at 17:59 -0700, Joshua Lock wrote:
> > >>
> > >> On 21/03/12 05:55, Dongxiao Xu wrote:
> > >>> Hi Richard,
> > >>>
> > >>> This pull request is Hob related bug fixes. Please help to review and pull.
> > >>>
> > >>> Thanks,
> > >>> Dongxiao
> > >>>
> > >>> The following changes since commit d595960fea0988df9004d927bc2ec3439540dd9c:
> > >>>
> > >>>     Hob: save CONF_VERSION and LCONF_VERSION into template (2012-03-20 14:39:45 +0000)
> > >>>
> > >>> are available in the git repository at:
> > >>>     git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
> > >>>     http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
> > >>>
> > >>> Dongxiao Xu (14):
> > >>>     Hob: Still use initcmd != None as the if judgement
> > >>>     Hob: Remove split model in GTK Hob
> > >>>     cooker: terminate each process when quitting recipe parsing
> > >>>     Hob: change package classes selection GUI
> > >>>     Hob: Change template button name from "Template" to "Templates"
> > >>
> > >> These all look fine.
> > >>
> > >>>     command.py: Change parseConfigurationFiles API from async to sync
> > >>>     process.py: Increase the timeout value for polling commands
> > >>>     Hob: Change parseConfigurationFiles API usage
> > >>
> > >> Can you explain some of the reasoning behind this set of changes? If the
> > >> command truly belongs as an asynchronous one I'm not sure why we need to
> > >> increase the timeout duration specifically for it.
> > >>
> > >>>     Hob: Fix the workaround to get image types
> > >
> > > Hi Josh,
> > >
> > > Actually the above three patches are preparations for this commit: "Hob:
> > > Fix the workaround to get image types".
> > >
> > > The background is that, we need to add extra inherits of
> > > image_types.bbclass before parsing configuration files and getting
> > > variables values. Therefore the modified code piece is something like:
> > >
> > > def get_parameters(self):
> > >      self.init_cooker()
> > >      self.set_extra_inherits("image_types")
> > >      self.parse_config()
> > >
> > >      self.server.runCommand(["getVariable", "MACHINE"])
> > >      ...
> > >
> > > We can see from above code is that, the parse_config locates between two
> > > SYNC commands (set_extra_inherits and getVariable). Therefore we also
> > > need the parse_config to be a SYNC command.
> > >
> > > As far as I know the parseConfigurationFiles API doesn't cost too much
> > > time (should less than 1s), so that's the reason why I change it to SYNC
> > > mode.
> > >
> > > The increase of time duration for parseConfigurationFiles is that, the
> > > process server use pipe mode to pass object (function) from one to
> > > another. The original 0.5 second timeout isn't enough for transferring
> > > "parseConfigurationFiles" object, the phenomenon is that on certain
> > > machines, the runCommand result is messed up with wrong values. This
> > > issue doesn't exist with xmlrpc server.
> > 
> > OK, I understand what you're trying to achieve. I'm afraid I'm not 
> > convinced that we need to make such an invasive change though. Any 
> > reason we can't re-order the initialisation so that everything is done 
> > after the async parseConfigurationFiles?
> > 
> > I'm nervous of us pushing the 0.5s->1s change this late in the cycle. 
> > Have you any indication of whether it affects builds using knotty?
> > 
> > Just to be clear I think Richard needs to ack/nack this change to core 
> > BitBake. The Hob changes related to it are fine by me.
> 
> Having a sync command blocking the system for over 1 second isn't right.
> Sync commands are meant to be fast (say 0.01s max) and this obviously
> isn't.
> 
> I'm rather concerned about this and it suggests something is wrong with
> hob's init/state code to be honest.

The above case is not in current Hob code, I added it only after I
change parseConfigurationFiles to SYNC mode. There is no problem with
current Hob's init code.

> 
> My suggestion would be to add an extra parameter to self.parse_config()
> so you can set other classes to inherit (and variables to set). You will
> still have to then read MACHINE later but I think that is reasonable.

I will try to implement it in ASYNC mode. 

Thanks,
Dongxiao

> 
> Cheers,
> 
> Richard
> 
> 
> 





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

end of thread, other threads:[~2012-03-23  3:52 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 12:55 [PATCH 00/17][PULL] Hob: Bunch of bug fixes Dongxiao Xu
2012-03-21 12:55 ` [PATCH 01/17] Hob: Still use initcmd != None as the if judgement Dongxiao Xu
2012-03-21 12:55 ` [PATCH 02/17] Hob: Remove split model in GTK Hob Dongxiao Xu
2012-03-21 12:55 ` [PATCH 03/17] cooker: terminate each process when quitting recipe parsing Dongxiao Xu
2012-03-21 12:55 ` [PATCH 04/17] Hob: change package classes selection GUI Dongxiao Xu
2012-03-21 12:55 ` [PATCH 05/17] Hob: Change template button name from "Template" to "Templates" Dongxiao Xu
2012-03-21 12:55 ` [PATCH 06/17] command.py: Change parseConfigurationFiles API from async to sync Dongxiao Xu
2012-03-21 12:55 ` [PATCH 07/17] process.py: Increase the timeout value for polling commands Dongxiao Xu
2012-03-21 12:55 ` [PATCH 08/17] Hob: Change parseConfigurationFiles API usage Dongxiao Xu
2012-03-21 12:55 ` [PATCH 09/17] Hob: Fix the workaround to get image types Dongxiao Xu
2012-03-21 12:55 ` [PATCH 10/17] Hob: Change recipe selection tab order Dongxiao Xu
2012-03-21 12:55 ` [PATCH 11/17] Hob: Change package " Dongxiao Xu
2012-03-21 12:55 ` [PATCH 12/17] Hob: Move "Create your own image" to the bottom of image list Dongxiao Xu
2012-03-21 12:55 ` [PATCH 13/17] Hob: Change window title from HOB to Hob Dongxiao Xu
2012-03-21 12:55 ` [PATCH 14/17] Hob: Change "View Packages" description Dongxiao Xu
2012-03-21 12:55 ` [PATCH 15/17] Hob: Change the titles for recipe view and package view Dongxiao Xu
2012-03-21 12:55 ` [PATCH 16/17] cooker: add inherit information when generating package tree Dongxiao Xu
2012-03-21 12:55 ` [PATCH 17/17] Hob: Use inherit information to judge if a recipe is image type Dongxiao Xu
2012-03-22  0:59 ` [PATCH 00/17][PULL] Hob: Bunch of bug fixes Joshua Lock
2012-03-22  1:21   ` Xu, Dongxiao
2012-03-22 22:32     ` Joshua Lock
2012-03-22 23:33       ` Richard Purdie
2012-03-23  3:41         ` Xu, Dongxiao

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.