summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-29 17:02:39 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-30 21:57:14 +0100
commit9a047762cf6dd5dff785db6454df8b4aba499d0b (patch)
tree5c3b6daef48fbace1e8310882d61caf97e61d8d4 /bitbake
parente2a3f283304e46b05e4900607d0568aec9b41f22 (diff)
downloadast2050-yocto-poky-9a047762cf6dd5dff785db6454df8b4aba499d0b.zip
ast2050-yocto-poky-9a047762cf6dd5dff785db6454df8b4aba499d0b.tar.gz
ui/crumbs/tasklistmodel: prevent packages depending on each other
Don't add y to x's COL_BINB if x is in y's COL_BINB - prevent circular dependencies. Further this patch improves the variable naming to make this code easier to follow. Fixes [YOCTO #1423] (Bitbake rev: 01ef2ab0d201f3cb3666462558c9cf485592e04f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/tasklistmodel.py42
1 files changed, 22 insertions, 20 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
index edb4d96..8413873 100644
--- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
@@ -434,39 +434,41 @@ class TaskListModel(gtk.ListStore):
Add this item, and any of its dependencies, to the image contents
"""
def include_item(self, item_path, binb="", image_contents=False):
- name = self[item_path][self.COL_NAME]
- deps = self[item_path][self.COL_DEPS]
- cur_inc = self[item_path][self.COL_INC]
- if not cur_inc:
+ item_name = self[item_path][self.COL_NAME]
+ item_deps = self[item_path][self.COL_DEPS]
+ item_inc = self[item_path][self.COL_INC]
+ if not item_inc:
self[item_path][self.COL_INC] = True
- bin = self[item_path][self.COL_BINB].split(', ')
- if not binb in bin:
- bin.append(binb)
- self[item_path][self.COL_BINB] = ', '.join(bin).lstrip(', ')
+ item_bin = self[item_path][self.COL_BINB].split(', ')
+ if not binb in item_bin:
+ item_bin.append(binb)
+ self[item_path][self.COL_BINB] = ', '.join(item_bin).lstrip(', ')
# We want to do some magic with things which are brought in by the
# base image so tag them as so
if image_contents:
self[item_path][self.COL_IMG] = True
if self[item_path][self.COL_TYPE] == 'image':
- self.selected_image = name
+ self.selected_image = item_name
- if deps:
+ if item_deps:
# add all of the deps and set their binb to this item
- for dep in deps.split(" "):
+ for dep in item_deps.split(" "):
# If the contents model doesn't already contain dep, add it
dep_included = self.contents_includes_name(dep)
- path = self.find_path_for_item(dep)
- if not path:
+ dep_path = self.find_path_for_item(dep)
+ if not dep_path:
continue
- if dep_included:
- bin = self[path][self.COL_BINB].split(', ')
- if not name in bin:
- bin.append(name)
- self[path][self.COL_BINB] = ', '.join(bin).lstrip(', ')
- else:
- self.include_item(path, binb=name, image_contents=image_contents)
+ if dep_included and not dep in item_bin:
+ # don't set the COL_BINB to this item if the target is an
+ # item in our own COL_BINB
+ dep_bin = self[dep_path][self.COL_BINB].split(', ')
+ if not item_name in dep_bin:
+ dep_bin.append(item_name)
+ self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
+ elif not dep_included:
+ self.include_item(dep_path, binb=item_name, image_contents=image_contents)
"""
Find the model path for the item_name
OpenPOWER on IntegriCloud