summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-04-03 11:16:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-03 11:33:20 +0100
commitb05e741cb5fe44b37538f2b727782f80dc9bb8fa (patch)
tree79dfcdb713d3c35f214af367fa8e6abdb27ff5bd /lib/bb/ui/buildinfohelper.py
parent0d76a5461ce4bd554ff70a465064969e53edf0a4 (diff)
downloadbitbake-b05e741cb5fe44b37538f2b727782f80dc9bb8fa.tar.gz
toaster: fix mis-detection of targets as images
If you are using the testimage class then the old test mistook the global inheritance of testimage.bbclass with the recipe inheriting image.bbclass because it was only looking for that at the end of the string. Also tidy up the code so you an easily tell what it's doing. (The original method may have been more "pythonic", but it does nothing for readability.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui/buildinfohelper.py')
-rw-r--r--lib/bb/ui/buildinfohelper.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 2a9e0981c..e4d2f1f5a 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -845,10 +845,12 @@ class BuildInfoHelper(object):
recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker']
recipe_info['file_path'] = file_name
recipe = self.orm_wrapper.get_update_recipe_object(recipe_info)
+ recipe.is_image = False
if 'inherits' in event._depgraph['pn'][pn].keys():
- recipe.is_image = True in map(lambda x: x.endswith('image.bbclass'), event._depgraph['pn'][pn]['inherits'])
- else:
- recipe.is_image = False
+ for cls in event._depgraph['pn'][pn]['inherits']:
+ if cls.endswith('/image.bbclass'):
+ recipe.is_image = True
+ break
if recipe.is_image:
for t in self.internal_state['targets']:
if pn == t.target: