summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-20 16:44:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-21 22:08:11 +0100
commite2d2377257c974d954d68d37875eee84c13dead4 (patch)
tree15daf7a9cc993c595e3f6f4f128fa89a3dacddc2 /bitbake
parent2bdd51854fde31c9f911b705a2053f684d25ebe3 (diff)
downloadast2050-yocto-poky-e2d2377257c974d954d68d37875eee84c13dead4.zip
ast2050-yocto-poky-e2d2377257c974d954d68d37875eee84c13dead4.tar.gz
ui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies
When calculating what dependencies are affected by the removal of an item we should ignore images and tasks as they are not constructs which make sense in the GUI. E.g: if we don't ignore tasks and remove opkg from an image based on core-image-minimal the fact that opkg was brought in by task-core results in task-core and all of the packages it brought in being removed and, eventually, an empty image. (Bitbake rev: 205b52bfc7f28af0c50fef1f741fae6af16fb0dc) 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.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
index e28dbe7..112fdde 100644
--- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
@@ -306,9 +306,16 @@ class TaskListModel(gtk.ListStore):
# Remove all dependent packages, update binb
while it:
path = self.get_path(it)
+ it = self.iter_next(it)
+
inc = self[path][self.COL_INC]
deps = self[path][self.COL_DEPS]
binb = self[path][self.COL_BINB]
+ itype = self[path][self.COL_TYPE]
+
+ # We ignore anything that isn't a package
+ if not itype == "package":
+ continue
# FIXME: need to ensure partial name matching doesn't happen
if inc and deps.count(name):
@@ -318,8 +325,6 @@ class TaskListModel(gtk.ListStore):
bib = self.find_alt_dependency(name)
self[path][self.COL_BINB] = bib
- it = self.iter_next(it)
-
"""
Remove items from contents if the have an empty COL_BINB (brought in by)
caused by all packages they are a dependency of being removed.
@@ -488,10 +493,18 @@ class TaskListModel(gtk.ListStore):
it = self.contents.get_iter_first()
while it:
- if self.contents.get_value(it, self.COL_DEPS).count(pn) != 0:
- revdeps.append(self.contents.get_value(it, self.COL_NAME))
+ name = self.contents.get_value(it, self.COL_NAME)
+ itype = self.contents.get_value(it, self.COL_TYPE)
+ deps = self.contents.get_value(it, self.COL_DEPS)
+
it = self.contents.iter_next(it)
+ if not itype == 'package':
+ continue
+
+ if deps.count(pn) != 0:
+ revdeps.append(name)
+
if pn in revdeps:
revdeps.remove(pn)
return revdeps
OpenPOWER on IntegriCloud