diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-05 16:12:12 -0700 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2011-08-08 18:15:50 -0700 |
commit | 0ed58f28e869cceeefa930a3f1f46c5f3e9ffe21 (patch) | |
tree | 458b4b9309fee1909d476382e93832f489c3a512 /lib | |
parent | 5cacdc4f1641eda1b5707c96f7c40924a9db6174 (diff) | |
download | bitbake-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.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 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): |