diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-29 17:02:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-30 21:57:14 +0100 |
commit | 9a047762cf6dd5dff785db6454df8b4aba499d0b (patch) | |
tree | 5c3b6daef48fbace1e8310882d61caf97e61d8d4 | |
parent | e2a3f283304e46b05e4900607d0568aec9b41f22 (diff) | |
download | poky-9a047762cf6dd5dff785db6454df8b4aba499d0b.tar.gz |
ui/crumbs/tasklistmodel: prevent packages depending on each other
Don't add y to x's COL_BINB if x is in y's COL_BINB - prevent circular
dependencies.
Further this patch improves the variable naming to make this code easier to
follow.
Fixes [YOCTO #1423]
(Bitbake rev: 01ef2ab0d201f3cb3666462558c9cf485592e04f)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index edb4d96220..8413873a2c 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py | |||
@@ -434,39 +434,41 @@ class TaskListModel(gtk.ListStore): | |||
434 | Add this item, and any of its dependencies, to the image contents | 434 | Add this item, and any of its dependencies, to the image contents |
435 | """ | 435 | """ |
436 | def include_item(self, item_path, binb="", image_contents=False): | 436 | def include_item(self, item_path, binb="", image_contents=False): |
437 | name = self[item_path][self.COL_NAME] | 437 | item_name = self[item_path][self.COL_NAME] |
438 | deps = self[item_path][self.COL_DEPS] | 438 | item_deps = self[item_path][self.COL_DEPS] |
439 | cur_inc = self[item_path][self.COL_INC] | 439 | item_inc = self[item_path][self.COL_INC] |
440 | if not cur_inc: | 440 | if not item_inc: |
441 | self[item_path][self.COL_INC] = True | 441 | self[item_path][self.COL_INC] = True |
442 | 442 | ||
443 | bin = self[item_path][self.COL_BINB].split(', ') | 443 | item_bin = self[item_path][self.COL_BINB].split(', ') |
444 | if not binb in bin: | 444 | if not binb in item_bin: |
445 | bin.append(binb) | 445 | item_bin.append(binb) |
446 | self[item_path][self.COL_BINB] = ', '.join(bin).lstrip(', ') | 446 | self[item_path][self.COL_BINB] = ', '.join(item_bin).lstrip(', ') |
447 | 447 | ||
448 | # We want to do some magic with things which are brought in by the | 448 | # We want to do some magic with things which are brought in by the |
449 | # base image so tag them as so | 449 | # base image so tag them as so |
450 | if image_contents: | 450 | if image_contents: |
451 | self[item_path][self.COL_IMG] = True | 451 | self[item_path][self.COL_IMG] = True |
452 | if self[item_path][self.COL_TYPE] == 'image': | 452 | if self[item_path][self.COL_TYPE] == 'image': |
453 | self.selected_image = name | 453 | self.selected_image = item_name |
454 | 454 | ||
455 | if deps: | 455 | if item_deps: |
456 | # add all of the deps and set their binb to this item | 456 | # add all of the deps and set their binb to this item |
457 | for dep in deps.split(" "): | 457 | for dep in item_deps.split(" "): |
458 | # If the contents model doesn't already contain dep, add it | 458 | # If the contents model doesn't already contain dep, add it |
459 | dep_included = self.contents_includes_name(dep) | 459 | dep_included = self.contents_includes_name(dep) |
460 | path = self.find_path_for_item(dep) | 460 | dep_path = self.find_path_for_item(dep) |
461 | if not path: | 461 | if not dep_path: |
462 | continue | 462 | continue |
463 | if dep_included: | 463 | if dep_included and not dep in item_bin: |
464 | bin = self[path][self.COL_BINB].split(', ') | 464 | # don't set the COL_BINB to this item if the target is an |
465 | if not name in bin: | 465 | # item in our own COL_BINB |
466 | bin.append(name) | 466 | dep_bin = self[dep_path][self.COL_BINB].split(', ') |
467 | self[path][self.COL_BINB] = ', '.join(bin).lstrip(', ') | 467 | if not item_name in dep_bin: |
468 | else: | 468 | dep_bin.append(item_name) |
469 | self.include_item(path, binb=name, image_contents=image_contents) | 469 | self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ') |
470 | elif not dep_included: | ||
471 | self.include_item(dep_path, binb=item_name, image_contents=image_contents) | ||
470 | 472 | ||
471 | """ | 473 | """ |
472 | Find the model path for the item_name | 474 | Find the model path for the item_name |