[bitbake-devel] [PATCH 03/10] command|cooker: allow generating targets tree for specified pkgs
Joshua Lock
josh at linux.intel.com
Fri Jul 1 06:02:49 UTC 2011
Modify the generateTargetsTree command to allow a list of packages to be
supplied by the caller, in this case we will only generate a target tree
for user requested targets rather than building a tree for the world list.
Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
lib/bb/command.py | 12 ++++++++++--
lib/bb/cooker.py | 6 ++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 9841e68..d597d1d 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -224,11 +224,19 @@ class CommandsAsync:
def generateTargetsTree(self, command, params):
"""
- Generate a tree of all buildable targets.
+ Generate a tree of buildable targets.
+ If klass is provided ensure all recipes that inherit the class are
+ 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.
"""
klass = params[0]
+ if len(params) > 1:
+ pkg_list = params[1]
+ else:
+ pkg_list = []
- command.cooker.generateTargetsTree(klass)
+ command.cooker.generateTargetsTree(klass, pkg_list)
command.finishAsyncCommand()
generateTargetsTree.needcache = True
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 990d17b..4ad1536 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -591,12 +591,14 @@ class BBCooker:
return target_tree
- def generateTargetsTree(self, klass):
+ def generateTargetsTree(self, klass=None, pkgs=[]):
"""
Generate a dependency tree of buildable targets
Generate an event with the result
"""
- pkgs = ['world']
+ # if the caller hasn't specified a pkgs list default to world
+ if not len(pkgs):
+ pkgs = ['world']
# if inherited_class passed ensure all recipes which inherit the
# specified class are included in pkgs
if klass:
--
1.7.5.4
More information about the bitbake-devel
mailing list