From 138178f5d2e39065629f51abd577bd607ca570d0 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Fri, 5 Aug 2011 16:12:12 -0700 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/ui/crumbs') diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index 8fb56837ea..3e097579fa 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/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): -- cgit v1.2.3-54-g00ecf