From patchwork Wed Mar 21 12:55:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 17/17] Hob: Use inherit information to judge if a recipe is image type Date: Wed, 21 Mar 2012 12:55:21 -0000 From: Dongxiao Xu X-Patchwork-Id: 24011 Message-Id: <99d30da5610bbe83fa7e1bc7bcbdb02740c0f91f.1332334068.git.dongxiao.xu@intel.com> To: bitbake-devel@lists.openembedded.org 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 --- 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'):