summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-02-23 21:47:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-23 22:52:17 +0000
commitde77b9752ab2df56d87dc15ed5cd0d2cd5544dc7 (patch)
tree74b02b6df6ab08626eab2fd6b17440b6cfd977fa /bitbake/lib/bb/command.py
parent85fa989df7a4928e42aad2eb5f34a5f3c2c9ae93 (diff)
downloadpoky-de77b9752ab2df56d87dc15ed5cd0d2cd5544dc7.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r--bitbake/lib/bb/command.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index be269372f0..06e886973b 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -242,14 +242,21 @@ 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.
245 """ 248 """
246 klass = params[0] 249 klass = params[0]
247 if len(params) > 1: 250 resolve = False
251 if len(params) > 2:
252 pkg_list = params[1]
253 resolve = params[2]
254 elif len(params) > 1:
248 pkg_list = params[1] 255 pkg_list = params[1]
249 else: 256 else:
250 pkg_list = [] 257 pkg_list = []
251 258
252 command.cooker.generateTargetsTree(klass, pkg_list) 259 command.cooker.generateTargetsTree(klass, pkg_list, resolve)
253 command.finishAsyncCommand() 260 command.finishAsyncCommand()
254 generateTargetsTree.needcache = True 261 generateTargetsTree.needcache = True
255 262