summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-05 16:12:12 -0700
committerJoshua Lock <josh@linux.intel.com>2011-08-08 18:15:50 -0700
commit0ed58f28e869cceeefa930a3f1f46c5f3e9ffe21 (patch)
tree458b4b9309fee1909d476382e93832f489c3a512 /lib
parent5cacdc4f1641eda1b5707c96f7c40924a9db6174 (diff)
downloadbitbake-contrib-0ed58f28e869cceeefa930a3f1f46c5f3e9ffe21.tar.gz
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] Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/ui/crumbs/tasklistmodel.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 8fb56837e..3e097579f 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -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):