diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 50 |
1 files changed, 17 insertions, 33 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index b0f5d7a7b6..d2f49d1642 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py | |||
@@ -350,7 +350,7 @@ class TaskListModel(gtk.ListStore): | |||
350 | 350 | ||
351 | inc = self[path][self.COL_INC] | 351 | inc = self[path][self.COL_INC] |
352 | deps = self[path][self.COL_DEPS] | 352 | deps = self[path][self.COL_DEPS] |
353 | binb = self[path][self.COL_BINB] | 353 | binb = self[path][self.COL_BINB].split(', ') |
354 | itype = self[path][self.COL_TYPE] | 354 | itype = self[path][self.COL_TYPE] |
355 | itname = self[path][self.COL_NAME] | 355 | itname = self[path][self.COL_NAME] |
356 | 356 | ||
@@ -362,7 +362,7 @@ class TaskListModel(gtk.ListStore): | |||
362 | # we should keep it and its dependencies, the easiest way to do so | 362 | # we should keep it and its dependencies, the easiest way to do so |
363 | # is to save its name and re-mark it for inclusion once dependency | 363 | # is to save its name and re-mark it for inclusion once dependency |
364 | # processing is complete | 364 | # processing is complete |
365 | if binb == "User Selected": | 365 | if "User Selected" in binb: |
366 | usersel[itname] = self[path][self.COL_IMG] | 366 | usersel[itname] = self[path][self.COL_IMG] |
367 | 367 | ||
368 | # If the iterated item is included and depends on the removed | 368 | # If the iterated item is included and depends on the removed |
@@ -376,8 +376,8 @@ class TaskListModel(gtk.ListStore): | |||
376 | # If the iterated item was brought in by the removed (passed) item | 376 | # If the iterated item was brought in by the removed (passed) item |
377 | # try and find an alternative dependee and update the binb column | 377 | # try and find an alternative dependee and update the binb column |
378 | if inc and marked_name in binb: | 378 | if inc and marked_name in binb: |
379 | bib = self.find_alt_dependency(itname) | 379 | binb.remove(marked_name) |
380 | self[path][self.COL_BINB] = bib | 380 | self[path][self.COL_BINB] = ', '.join(binb).lstrip(', ') |
381 | 381 | ||
382 | # Re-add any removed user selected items | 382 | # Re-add any removed user selected items |
383 | for u in usersel: | 383 | for u in usersel: |
@@ -415,25 +415,6 @@ class TaskListModel(gtk.ListStore): | |||
415 | it = self.contents.iter_next(it) | 415 | it = self.contents.iter_next(it) |
416 | 416 | ||
417 | """ | 417 | """ |
418 | Find the name of an item in the image contents which depends on the item | ||
419 | name. | ||
420 | Returns either an item name (str) or None | ||
421 | """ | ||
422 | def find_alt_dependency(self, name): | ||
423 | it = self.contents.get_iter_first() | ||
424 | while it: | ||
425 | # iterate all items in the contents model | ||
426 | path = self.contents.get_path(it) | ||
427 | deps = self.contents[path][self.COL_DEPS] | ||
428 | itname = self.contents[path][self.COL_NAME] | ||
429 | inc = self.contents[path][self.COL_INC] | ||
430 | if itname != name and inc and name in deps: | ||
431 | # if this item depends on the item, return this items name | ||
432 | return itname | ||
433 | it = self.contents.iter_next(it) | ||
434 | return "" | ||
435 | |||
436 | """ | ||
437 | Check the self.contents gtk.TreeModel for an item | 418 | Check the self.contents gtk.TreeModel for an item |
438 | where COL_NAME matches item_name | 419 | where COL_NAME matches item_name |
439 | Returns True if a match is found, False otherwise | 420 | Returns True if a match is found, False otherwise |
@@ -456,7 +437,10 @@ class TaskListModel(gtk.ListStore): | |||
456 | cur_inc = self[item_path][self.COL_INC] | 437 | cur_inc = self[item_path][self.COL_INC] |
457 | if not cur_inc: | 438 | if not cur_inc: |
458 | self[item_path][self.COL_INC] = True | 439 | self[item_path][self.COL_INC] = True |
459 | self[item_path][self.COL_BINB] = binb | 440 | |
441 | bin = self[item_path][self.COL_BINB].split(', ') | ||
442 | bin.append(binb) | ||
443 | self[item_path][self.COL_BINB] = ', '.join(bin).lstrip(', ') | ||
460 | 444 | ||
461 | # We want to do some magic with things which are brought in by the | 445 | # We want to do some magic with things which are brought in by the |
462 | # base image so tag them as so | 446 | # base image so tag them as so |
@@ -469,16 +453,16 @@ class TaskListModel(gtk.ListStore): | |||
469 | # add all of the deps and set their binb to this item | 453 | # add all of the deps and set their binb to this item |
470 | for dep in deps.split(" "): | 454 | for dep in deps.split(" "): |
471 | # If the contents model doesn't already contain dep, add it | 455 | # If the contents model doesn't already contain dep, add it |
472 | # We only care to show things which will end up in the | ||
473 | # resultant image, so filter cross and native recipes | ||
474 | dep_included = self.contents_includes_name(dep) | 456 | dep_included = self.contents_includes_name(dep) |
475 | path = self.find_path_for_item(dep) | 457 | path = self.find_path_for_item(dep) |
476 | if not dep_included and path: | 458 | if not path: |
477 | self.include_item(path, name, image_contents) | 459 | continue |
478 | # Set brought in by for any no longer orphan packages | 460 | if dep_included: |
479 | elif dep_included and path: | 461 | bin = self[path][self.COL_BINB].split(', ') |
480 | if not self[path][self.COL_BINB]: | 462 | bin.append(name) |
481 | self[path][self.COL_BINB] = name | 463 | self[path][self.COL_BINB] = ', '.join(bin).lstrip(', ') |
464 | else: | ||
465 | self.include_item(path, binb=name, image_contents=image_contents) | ||
482 | 466 | ||
483 | """ | 467 | """ |
484 | Find the model path for the item_name | 468 | Find the model path for the item_name |
@@ -535,7 +519,7 @@ class TaskListModel(gtk.ListStore): | |||
535 | 519 | ||
536 | it = self.contents.get_iter_first() | 520 | it = self.contents.get_iter_first() |
537 | while it: | 521 | while it: |
538 | sel = self.contents.get_value(it, self.COL_BINB) == "User Selected" | 522 | sel = "User Selected" in self.contents.get_value(it, self.COL_BINB) |
539 | name = self.contents.get_value(it, self.COL_NAME) | 523 | name = self.contents.get_value(it, self.COL_NAME) |
540 | allpkgs.append(name) | 524 | allpkgs.append(name) |
541 | if sel: | 525 | if sel: |