diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-02-29 22:15:17 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-01 15:51:34 +0000 |
commit | 612173b48fb40f0ae8c5a73ea13749a2670c7cd4 (patch) | |
tree | e2ddda0371e488fa058d1f657b540c4c9bc57982 /bitbake | |
parent | 222ec1c803d54ef68600322a355d1564d632c505 (diff) | |
download | poky-612173b48fb40f0ae8c5a73ea13749a2670c7cd4.tar.gz |
command.py: remove the resolve parameter in generateTargetsTree
Remove the "resolve" parameter since the original resolve=False
option is no longer be used.
(Bitbake rev: dadce609149cfb09ecdc53bfe1f416a3f57a5033)
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/command.py | 14 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 33 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 2 |
3 files changed, 17 insertions, 32 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 06e886973b..1799f1cc3c 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -242,21 +242,11 @@ class CommandsAsync: | |||
242 | included in the package list. | 242 | included in the package list. |
243 | If pkg_list provided use that list (plus any extras brought in by | 243 | If pkg_list provided use that list (plus any extras brought in by |
244 | klass) rather than generating a tree for all packages. | 244 | klass) rather than generating a tree for all packages. |
245 | |||
246 | Add a new option "resolve" to indicate if we need to resolve the | ||
247 | replacement for "virtual/xxx" like pn. | ||
248 | """ | 245 | """ |
249 | klass = params[0] | 246 | klass = params[0] |
250 | resolve = False | 247 | pkg_list = params[1] |
251 | if len(params) > 2: | ||
252 | pkg_list = params[1] | ||
253 | resolve = params[2] | ||
254 | elif len(params) > 1: | ||
255 | pkg_list = params[1] | ||
256 | else: | ||
257 | pkg_list = [] | ||
258 | 248 | ||
259 | command.cooker.generateTargetsTree(klass, pkg_list, resolve) | 249 | command.cooker.generateTargetsTree(klass, pkg_list) |
260 | command.finishAsyncCommand() | 250 | command.finishAsyncCommand() |
261 | generateTargetsTree.needcache = True | 251 | generateTargetsTree.needcache = True |
262 | 252 | ||
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index ea09c5d68b..6cc0504c26 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -455,7 +455,7 @@ class BBCooker: | |||
455 | depend_tree_package[package]["filename"] = fn | 455 | depend_tree_package[package]["filename"] = fn |
456 | depend_tree_package[package]["version"] = version | 456 | depend_tree_package[package]["version"] = version |
457 | 457 | ||
458 | def generatePkgDepTreeData(self, pkgs_to_build, task, resolve=False): | 458 | def generatePkgDepTreeData(self, pkgs_to_build, task): |
459 | """ | 459 | """ |
460 | Create a dependency tree of pkgs_to_build, returning the data. | 460 | Create a dependency tree of pkgs_to_build, returning the data. |
461 | """ | 461 | """ |
@@ -501,19 +501,16 @@ class BBCooker: | |||
501 | 501 | ||
502 | depend_tree["depends"][pn] = [] | 502 | depend_tree["depends"][pn] = [] |
503 | for dep in taskdata.depids[fnid]: | 503 | for dep in taskdata.depids[fnid]: |
504 | if resolve: | 504 | item = taskdata.build_names_index[dep] |
505 | item = taskdata.build_names_index[dep] | 505 | pn_provider = "" |
506 | pn_provider = "" | 506 | targetid = taskdata.getbuild_id(item) |
507 | targetid = taskdata.getbuild_id(item) | 507 | if targetid in taskdata.build_targets and taskdata.build_targets[targetid]: |
508 | if targetid in taskdata.build_targets and taskdata.build_targets[targetid]: | 508 | fnid = taskdata.build_targets[targetid][0] |
509 | fnid = taskdata.build_targets[targetid][0] | 509 | fn_provider = taskdata.fn_index[fnid] |
510 | fn_provider = taskdata.fn_index[fnid] | 510 | pn_provider = self.status.pkg_fn[fn_provider] |
511 | pn_provider = self.status.pkg_fn[fn_provider] | ||
512 | else: | ||
513 | pn_provider = item | ||
514 | depend_tree["depends"][pn].append(pn_provider) | ||
515 | else: | 511 | else: |
516 | depend_tree["depends"][pn].append(taskdata.build_names_index[dep]) | 512 | pn_provider = item |
513 | depend_tree["depends"][pn].append(pn_provider) | ||
517 | 514 | ||
518 | depend_tree["rdepends-pn"][pn] = [] | 515 | depend_tree["rdepends-pn"][pn] = [] |
519 | for rdep in taskdata.rdepids[fnid]: | 516 | for rdep in taskdata.rdepids[fnid]: |
@@ -523,8 +520,7 @@ class BBCooker: | |||
523 | depend_tree["rdepends-pkg"][package] = [] | 520 | depend_tree["rdepends-pkg"][package] = [] |
524 | for rdepend in rdepends[package]: | 521 | for rdepend in rdepends[package]: |
525 | depend_tree["rdepends-pkg"][package].append(rdepend) | 522 | depend_tree["rdepends-pkg"][package].append(rdepend) |
526 | if resolve: | 523 | self.append_package(taskdata, depend_tree["packages"], rdepend) |
527 | self.append_package(taskdata, depend_tree["packages"], rdepend) | ||
528 | if not package in packages: | 524 | if not package in packages: |
529 | packages.append(package) | 525 | packages.append(package) |
530 | 526 | ||
@@ -532,8 +528,7 @@ class BBCooker: | |||
532 | depend_tree["rrecs-pkg"][package] = [] | 528 | depend_tree["rrecs-pkg"][package] = [] |
533 | for rrec in rrecs[package]: | 529 | for rrec in rrecs[package]: |
534 | depend_tree["rrecs-pkg"][package].append(rrec) | 530 | depend_tree["rrecs-pkg"][package].append(rrec) |
535 | if resolve: | 531 | self.append_package(taskdata, depend_tree["packages"], rrec) |
536 | self.append_package(taskdata, depend_tree["packages"], rrec) | ||
537 | if not package in packages: | 532 | if not package in packages: |
538 | packages.append(package) | 533 | packages.append(package) |
539 | 534 | ||
@@ -784,7 +779,7 @@ class BBCooker: | |||
784 | 779 | ||
785 | return pkg_list | 780 | return pkg_list |
786 | 781 | ||
787 | def generateTargetsTree(self, klass=None, pkgs=[], resolve=False): | 782 | def generateTargetsTree(self, klass=None, pkgs=[]): |
788 | """ | 783 | """ |
789 | Generate a dependency tree of buildable targets | 784 | Generate a dependency tree of buildable targets |
790 | Generate an event with the result | 785 | Generate an event with the result |
@@ -799,7 +794,7 @@ class BBCooker: | |||
799 | pkgs = pkgs + extra_pkgs | 794 | pkgs = pkgs + extra_pkgs |
800 | 795 | ||
801 | # generate a dependency tree for all our packages | 796 | # generate a dependency tree for all our packages |
802 | tree = self.generatePkgDepTreeData(pkgs, 'build', resolve) | 797 | tree = self.generatePkgDepTreeData(pkgs, 'build') |
803 | bb.event.fire(bb.event.TargetsTreeGenerated(tree), self.configuration.data) | 798 | bb.event.fire(bb.event.TargetsTreeGenerated(tree), self.configuration.data) |
804 | 799 | ||
805 | def buildWorldTargetList(self): | 800 | def buildWorldTargetList(self): |
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 2bf4ed84a1..6c109fc551 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -148,7 +148,7 @@ class HobHandler(gobject.GObject): | |||
148 | elif next_command == self.PARSE_BBFILES: | 148 | elif next_command == self.PARSE_BBFILES: |
149 | self.server.runCommand(["parseFiles"]) | 149 | self.server.runCommand(["parseFiles"]) |
150 | elif next_command == self.GENERATE_TGTS: | 150 | elif next_command == self.GENERATE_TGTS: |
151 | self.server.runCommand(["generateTargetsTree", "classes/image.bbclass", [], True]) | 151 | self.server.runCommand(["generateTargetsTree", "classes/image.bbclass", []]) |
152 | elif next_command == self.GENERATE_PACKAGEINFO: | 152 | elif next_command == self.GENERATE_PACKAGEINFO: |
153 | self.server.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"]) | 153 | self.server.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"]) |
154 | elif next_command == self.BUILD_TARGET_RECIPES: | 154 | elif next_command == self.BUILD_TARGET_RECIPES: |