mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
command|cooker: allow generating targets tree for specified pkgs
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. (Bitbake rev: d4e4f2ecae96e074b2ab3bb9882037af2e385fdd) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
cbd00b8927
commit
a8afb3b353
@@ -224,11 +224,19 @@ class CommandsAsync:
|
|||||||
|
|
||||||
def generateTargetsTree(self, command, params):
|
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]
|
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()
|
command.finishAsyncCommand()
|
||||||
generateTargetsTree.needcache = True
|
generateTargetsTree.needcache = True
|
||||||
|
|
||||||
|
|||||||
@@ -594,12 +594,14 @@ class BBCooker:
|
|||||||
|
|
||||||
return target_tree
|
return target_tree
|
||||||
|
|
||||||
def generateTargetsTree(self, klass):
|
def generateTargetsTree(self, klass=None, pkgs=[]):
|
||||||
"""
|
"""
|
||||||
Generate a dependency tree of buildable targets
|
Generate a dependency tree of buildable targets
|
||||||
Generate an event with the result
|
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
|
# if inherited_class passed ensure all recipes which inherit the
|
||||||
# specified class are included in pkgs
|
# specified class are included in pkgs
|
||||||
if klass:
|
if klass:
|
||||||
|
|||||||
Reference in New Issue
Block a user