[bitbake-devel] [PATCH 1/4] bb/ui/crumbs/tasklistmodel: prevent hang when removing item

Joshua Lock josh at linux.intel.com
Tue Aug 9 01:18:28 UTC 2011


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 at linux.intel.com>
---
 lib/bb/ui/crumbs/tasklistmodel.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 8fb5683..3e09757 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):
-- 
1.7.6





More information about the bitbake-devel mailing list