diff options
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index 790631fc98..518232dc35 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py | |||
| @@ -417,18 +417,10 @@ class TaskListModel(gtk.ListStore): | |||
| 417 | it = self.contents.iter_next(it) | 417 | it = self.contents.iter_next(it) |
| 418 | 418 | ||
| 419 | """ | 419 | """ |
| 420 | Check the self.contents gtk.TreeModel for an item | 420 | Check whether the item at item_path is included or not |
| 421 | where COL_NAME matches item_name | ||
| 422 | Returns True if a match is found, False otherwise | ||
| 423 | """ | 421 | """ |
| 424 | def contents_includes_name(self, item_name): | 422 | def contents_includes_path(self, item_path): |
| 425 | it = self.contents.get_iter_first() | 423 | return self[item_path][self.COL_INC] |
| 426 | while it: | ||
| 427 | path = self.contents.get_path(it) | ||
| 428 | if self.contents[path][self.COL_NAME] == item_name: | ||
| 429 | return True | ||
| 430 | it = self.contents.iter_next(it) | ||
| 431 | return False | ||
| 432 | 424 | ||
| 433 | """ | 425 | """ |
| 434 | Add this item, and any of its dependencies, to the image contents | 426 | Add this item, and any of its dependencies, to the image contents |
| @@ -452,13 +444,15 @@ class TaskListModel(gtk.ListStore): | |||
| 452 | self.selected_image = item_name | 444 | self.selected_image = item_name |
| 453 | 445 | ||
| 454 | if item_deps: | 446 | if item_deps: |
| 455 | # add all of the deps and set their binb to this item | 447 | # Ensure all of the items deps are included and, where appropriate, |
| 448 | # add this item to their COL_BINB | ||
| 456 | for dep in item_deps.split(" "): | 449 | for dep in item_deps.split(" "): |
| 457 | # If the contents model doesn't already contain dep, add it | 450 | # If the contents model doesn't already contain dep, add it |
| 458 | dep_included = self.contents_includes_name(dep) | ||
| 459 | dep_path = self.find_path_for_item(dep) | 451 | dep_path = self.find_path_for_item(dep) |
| 460 | if not dep_path: | 452 | if not dep_path: |
| 461 | continue | 453 | continue |
| 454 | dep_included = self.contents_includes_path(dep_path) | ||
| 455 | |||
| 462 | if dep_included and not dep in item_bin: | 456 | if dep_included and not dep in item_bin: |
| 463 | # don't set the COL_BINB to this item if the target is an | 457 | # don't set the COL_BINB to this item if the target is an |
| 464 | # item in our own COL_BINB | 458 | # item in our own COL_BINB |
