bb/ui/crumbs/tasklistmodel: prevent hang when removing item

It's possible to trigger an infinite recursion when removing a package
where many of the dependencies share their dependencies. Prevent this by
keeping a list of removed item names and only removing the item when it's
not in the list.

Addresses [YOCTO #1319]

(Bitbake rev: 0ed58f28e869cceeefa930a3f1f46c5f3e9ffe21)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock
2011-08-05 16:12:12 -07:00
committed by Richard Purdie
parent ecab5d610b
commit 138178f5d2

View File

@@ -315,6 +315,7 @@ class TaskListModel(gtk.ListStore):
"""
def mark(self, opath):
usersel = {}
removed = []
it = self.get_iter_first()
name = self[opath][self.COL_NAME]
@@ -343,8 +344,9 @@ class TaskListModel(gtk.ListStore):
usersel[iname] = self[path][self.COL_IMG]
# FIXME: need to ensure partial name matching doesn't happen
if inc and deps.count(name):
if inc and deps.count(name) and name not in removed:
# found a dependency, remove it
removed.append(name)
self.mark(path)
if inc and binb.count(name):