diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-02-29 22:15:20 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-01 15:51:35 +0000 |
commit | 61d2081d2411e5e709bf6959f486e286b20477f4 (patch) | |
tree | 5723fa9b47982ef5f49b3660fe4b5de773007088 /bitbake | |
parent | ca566412b1d557ef52c599dccb4464a95227bc54 (diff) | |
download | poky-61d2081d2411e5e709bf6959f486e286b20477f4.tar.gz |
Hob(crumbs/hoblistmodel.py): Fix recipe's populate() function
According to the cooker's change, this commit fixes the way to getting
recipe's build dependency.
(Bitbake rev: da64e59f2e738d6103605139ba2d3e2cdaa35b11)
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py index 227ae4b5de..e440979434 100644 --- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py | |||
@@ -512,27 +512,6 @@ class RecipeListModel(gtk.ListStore): | |||
512 | it = view_model.iter_next(it) | 512 | it = view_model.iter_next(it) |
513 | return None | 513 | return None |
514 | 514 | ||
515 | def map_runtime(self, event_model, runtime, rdep_type, name): | ||
516 | if rdep_type not in ['pkg', 'pn'] or runtime not in ['rdepends', 'rrecs']: | ||
517 | return | ||
518 | package_depends = event_model["%s-%s" % (runtime, rdep_type)].get(name, []) | ||
519 | pn_depends = [] | ||
520 | for package_depend in package_depends: | ||
521 | if 'task-' not in package_depend and package_depend in event_model["packages"].keys(): | ||
522 | pn_depends.append(event_model["packages"][package_depend]["pn"]) | ||
523 | else: | ||
524 | pn_depends.append(package_depend) | ||
525 | return list(set(pn_depends)) | ||
526 | |||
527 | def subpkg_populate(self, event_model, pkg, desc, lic, group, atype, pn): | ||
528 | pn_depends = self.map_runtime(event_model, "rdepends", "pkg", pkg) | ||
529 | pn_depends += self.map_runtime(event_model, "rrecs", "pkg", pkg) | ||
530 | self.set(self.append(), self.COL_NAME, pkg, self.COL_DESC, desc, | ||
531 | self.COL_LIC, lic, self.COL_GROUP, group, | ||
532 | self.COL_DEPS, " ".join(pn_depends), self.COL_BINB, "", | ||
533 | self.COL_TYPE, atype, self.COL_INC, False, | ||
534 | self.COL_IMG, False, self.COL_INSTALL, "", self.COL_PN, pn) | ||
535 | |||
536 | """ | 515 | """ |
537 | The populate() function takes as input the data from a | 516 | The populate() function takes as input the data from a |
538 | bb.event.TargetsTreeGenerated event and populates the RecipeList. | 517 | bb.event.TargetsTreeGenerated event and populates the RecipeList. |
@@ -558,38 +537,27 @@ class RecipeListModel(gtk.ListStore): | |||
558 | group = event_model["pn"][item]["section"] | 537 | group = event_model["pn"][item]["section"] |
559 | install = [] | 538 | install = [] |
560 | 539 | ||
540 | depends = event_model["depends"].get(item, []) | ||
541 | rdepends = event_model["rdepends-pn"].get(item, []) | ||
542 | depends = depends + rdepends | ||
543 | |||
561 | if ('task-' in name): | 544 | if ('task-' in name): |
562 | if ('lib32-' in name or 'lib64-' in name): | 545 | if ('lib32-' in name or 'lib64-' in name): |
563 | atype = 'mltask' | 546 | atype = 'mltask' |
564 | else: | 547 | else: |
565 | atype = 'task' | 548 | atype = 'task' |
566 | for pkg in event_model["pn"][name]["packages"]: | ||
567 | self.subpkg_populate(event_model, pkg, desc, lic, group, atype, name) | ||
568 | continue | ||
569 | |||
570 | elif ('-image-' in name): | 549 | elif ('-image-' in name): |
571 | atype = 'image' | 550 | atype = 'image' |
572 | depends = event_model["depends"].get(item, []) | 551 | install = rdepends |
573 | rdepends = self.map_runtime(event_model, 'rdepends', 'pn', name) | ||
574 | depends = depends + rdepends | ||
575 | install = event_model["rdepends-pn"].get(item, []) | ||
576 | |||
577 | elif ('meta-' in name): | 552 | elif ('meta-' in name): |
578 | atype = 'toolchain' | 553 | atype = 'toolchain' |
579 | |||
580 | elif (name == 'dummy-image' or name == 'dummy-toolchain'): | 554 | elif (name == 'dummy-image' or name == 'dummy-toolchain'): |
581 | atype = 'dummy' | 555 | atype = 'dummy' |
582 | |||
583 | else: | 556 | else: |
584 | if ('lib32-' in name or 'lib64-' in name): | 557 | if ('lib32-' in name or 'lib64-' in name): |
585 | atype = 'mlrecipe' | 558 | atype = 'mlrecipe' |
586 | else: | 559 | else: |
587 | atype = 'recipe' | 560 | atype = 'recipe' |
588 | depends = event_model["depends"].get(item, []) | ||
589 | depends += self.map_runtime(event_model, 'rdepends', 'pn', item) | ||
590 | for pkg in event_model["pn"][name]["packages"]: | ||
591 | depends += self.map_runtime(event_model, 'rdepends', 'pkg', item) | ||
592 | depends += self.map_runtime(event_model, 'rrecs', 'pkg', item) | ||
593 | 561 | ||
594 | self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc, | 562 | self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc, |
595 | self.COL_LIC, lic, self.COL_GROUP, group, | 563 | self.COL_LIC, lic, self.COL_GROUP, group, |