From de77b9752ab2df56d87dc15ed5cd0d2cd5544dc7 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Thu, 23 Feb 2012 21:47:14 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/command.py') 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: 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 -- cgit v1.2.3-54-g00ecf