diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-04-03 11:16:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-04 11:53:52 +0100 |
commit | 082a4170aca8e71cb56ae880e37bc62be6876d18 (patch) | |
tree | 9dbdc56c64713204262a468140ec950d5d386748 /bitbake/lib | |
parent | 432505d5636a0303dfe3db26db15055d98624dc8 (diff) | |
download | poky-082a4170aca8e71cb56ae880e37bc62be6876d18.tar.gz |
bitbake: 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.)
(Bitbake rev: b05e741cb5fe44b37538f2b727782f80dc9bb8fa)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 2a9e0981c7..e4d2f1f5a4 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -845,10 +845,12 @@ class BuildInfoHelper(object): | |||
845 | recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker'] | 845 | recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker'] |
846 | recipe_info['file_path'] = file_name | 846 | recipe_info['file_path'] = file_name |
847 | recipe = self.orm_wrapper.get_update_recipe_object(recipe_info) | 847 | recipe = self.orm_wrapper.get_update_recipe_object(recipe_info) |
848 | recipe.is_image = False | ||
848 | if 'inherits' in event._depgraph['pn'][pn].keys(): | 849 | if 'inherits' in event._depgraph['pn'][pn].keys(): |
849 | recipe.is_image = True in map(lambda x: x.endswith('image.bbclass'), event._depgraph['pn'][pn]['inherits']) | 850 | for cls in event._depgraph['pn'][pn]['inherits']: |
850 | else: | 851 | if cls.endswith('/image.bbclass'): |
851 | recipe.is_image = False | 852 | recipe.is_image = True |
853 | break | ||
852 | if recipe.is_image: | 854 | if recipe.is_image: |
853 | for t in self.internal_state['targets']: | 855 | for t in self.internal_state['targets']: |
854 | if pn == t.target: | 856 | if pn == t.target: |