[bitbake-devel,17/17] Hob: Use inherit information to judge if a recipe is image type

Submitted by Dongxiao Xu on March 21, 2012, 12:55 p.m.

Details

Message ID 99d30da5610bbe83fa7e1bc7bcbdb02740c0f91f.1332334068.git.dongxiao.xu@intel.com
State Accepted
Commit bdbee0c899e115ad08b9a77d3e58d6767766da75
Headers show

Commit Message

Dongxiao Xu March 21, 2012, 12:55 p.m.
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(-)

Patch hide | download patch | download mbox

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'):