aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/providers.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-23 00:52:21 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-22 12:45:02 +0000
commitaba0dce57c889495ec5c13919991a060aeff65d2 (patch)
tree35880b1835f72a056514b805823fcc1fb65b71b2 /lib/bb/providers.py
parent6c488afb0fe30a9655ec62a1d22f9f388365f012 (diff)
downloadbitbake-aba0dce57c889495ec5c13919991a060aeff65d2.tar.gz
taskdata: add the ability to access world targets list
In certain circumstances it can be useful to get access to the world targets list from a recipe in order to add dependencies on some or all of the items in it. If a special function, 'calculate_extra_depends' is defined in the recipe, and the recipe is to be built, then call it at the right point before we calculate which tasks should be run. The function can append items to the "deps" list in order to add dependencies. This is not as tidy a solution as I would have liked, but it does at least do the job. As part of this change, the buildWorldTargets function was moved to bb.providers to make it possible to call from taskdata. Part of the implementation of [YOCTO #8600]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/providers.py')
-rw-r--r--lib/bb/providers.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index 637e1fab9..68c8d592d 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -379,3 +379,29 @@ def getRuntimeProviders(dataCache, rdepend):
logger.debug(1, "Assuming %s is a dynamic package, but it may not exist" % rdepend)
return rproviders
+
+
+def buildWorldTargetList(dataCache):
+ """
+ Build package list for "bitbake world"
+ """
+ if dataCache.world_target:
+ return
+
+ logger.debug(1, "collating packages for \"world\"")
+ for f in dataCache.possible_world:
+ terminal = True
+ pn = dataCache.pkg_fn[f]
+
+ for p in dataCache.pn_provides[pn]:
+ if p.startswith('virtual/'):
+ logger.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p)
+ terminal = False
+ break
+ for pf in dataCache.providers[p]:
+ if dataCache.pkg_fn[pf] != pn:
+ logger.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p)
+ terminal = False
+ break
+ if terminal:
+ dataCache.world_target.add(pn)