summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/command.py12
-rw-r--r--bitbake/lib/bb/cooker.py6
2 files changed, 14 insertions, 4 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 9841e6874e..d597d1d39b 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -224,11 +224,19 @@ class CommandsAsync:
224 224
225 def generateTargetsTree(self, command, params): 225 def generateTargetsTree(self, command, params):
226 """ 226 """
227 Generate a tree of all buildable targets. 227 Generate a tree of buildable targets.
228 If klass is provided ensure all recipes that inherit the class are
229 included in the package list.
230 If pkg_list provided use that list (plus any extras brought in by
231 klass) rather than generating a tree for all packages.
228 """ 232 """
229 klass = params[0] 233 klass = params[0]
234 if len(params) > 1:
235 pkg_list = params[1]
236 else:
237 pkg_list = []
230 238
231 command.cooker.generateTargetsTree(klass) 239 command.cooker.generateTargetsTree(klass, pkg_list)
232 command.finishAsyncCommand() 240 command.finishAsyncCommand()
233 generateTargetsTree.needcache = True 241 generateTargetsTree.needcache = True
234 242
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index ebf963d5ba..a6f3befe15 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -594,12 +594,14 @@ class BBCooker:
594 594
595 return target_tree 595 return target_tree
596 596
597 def generateTargetsTree(self, klass): 597 def generateTargetsTree(self, klass=None, pkgs=[]):
598 """ 598 """
599 Generate a dependency tree of buildable targets 599 Generate a dependency tree of buildable targets
600 Generate an event with the result 600 Generate an event with the result
601 """ 601 """
602 pkgs = ['world'] 602 # if the caller hasn't specified a pkgs list default to world
603 if not len(pkgs):
604 pkgs = ['world']
603 # if inherited_class passed ensure all recipes which inherit the 605 # if inherited_class passed ensure all recipes which inherit the
604 # specified class are included in pkgs 606 # specified class are included in pkgs
605 if klass: 607 if klass: