command.py: add resolve option for generateTargetsTree API

Currently we have generateTargetsTree API, which is used to get
dependency information. However in that tree, there will be
"virtual/xxx" in depends fields. Therefore we add the resolve option
to replace it with its real providers.

Besides, for packages that provided by multiple recipes, we will find
their preverred provider.

(Bitbake rev: 28501612efdfc6ee47576cc90deb6e897883e7f5)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dongxiao Xu
2012-02-23 21:47:14 +08:00
committed by Richard Purdie
parent 85fa989df7
commit de77b9752a
2 changed files with 56 additions and 13 deletions

View File

@@ -242,14 +242,21 @@ class CommandsAsync:
included in the package list.
If pkg_list provided use that list (plus any extras brought in by
klass) rather than generating a tree for all packages.
Add a new option "resolve" to indicate if we need to resolve the
replacement for "virtual/xxx" like pn.
"""
klass = params[0]
if len(params) > 1:
resolve = False
if len(params) > 2:
pkg_list = params[1]
resolve = params[2]
elif len(params) > 1:
pkg_list = params[1]
else:
pkg_list = []
command.cooker.generateTargetsTree(klass, pkg_list)
command.cooker.generateTargetsTree(klass, pkg_list, resolve)
command.finishAsyncCommand()
generateTargetsTree.needcache = True