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

Dongxiao Xu dongxiao.xu at intel.com
Wed Mar 21 12:55:21 UTC 2012


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





More information about the bitbake-devel mailing list