summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/crumbs/tasklistmodel.py34
1 files changed, 19 insertions, 15 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
index 3e74e7fd32..633931dac6 100644
--- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
@@ -327,24 +327,28 @@ class TaskListModel(gtk.ListStore):
327 If the item isn't a package we leave it included. 327 If the item isn't a package we leave it included.
328 """ 328 """
329 def sweep_up(self): 329 def sweep_up(self):
330 model = self.contents
331 removals = []
332 it = self.contents.get_iter_first() 330 it = self.contents.get_iter_first()
333 331 while it:
334 while it: 332 binb = self.contents.get_value(it, self.COL_BINB)
335 binb = model.get_value(it, self.COL_BINB) 333 itype = self.contents.get_value(it, self.COL_TYPE)
336 itype = model.get_value(it, self.COL_TYPE) 334 remove = False
337 335
338 if itype == 'package' and not binb: 336 if itype == 'package' and not binb:
339 opath = model.convert_path_to_child_path(model.get_path(it)) 337 oit = self.contents.convert_iter_to_child_iter(it)
340 if not opath in removals: 338 opath = self.get_path(oit)
341 removals.extend(opath) 339 self.mark(opath)
342 340 remove = True
343 it = model.iter_next(it) 341
344 342 # When we remove a package from the contents model we alter the
345 while removals: 343 # model, so continuing to iterate is bad. *Furthermore* it's
346 path = removals.pop() 344 # likely that the removal has affected an already iterated item
347 self.mark(path) 345 # so we should start from the beginning anyway.
346 # Only when we've managed to iterate the entire contents model
347 # without removing any items do we allow the loop to exit.
348 if remove:
349 it = self.contents.get_iter_first()
350 else:
351 it = self.contents.iter_next(it)
348 352
349 """ 353 """
350 Find the name of an item in the image contents which depends on the item 354 Find the name of an item in the image contents which depends on the item