diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-01-23 00:52:21 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-22 12:45:44 +0000 |
commit | 76a281c870621f5b5608d098a70504c6069ccd11 (patch) | |
tree | 424154ecbd9cff7be886487d5c5c23bc16259a87 /bitbake/lib/bb/providers.py | |
parent | 11a1f496304b5273a13dac0acb27815ecfcb8714 (diff) | |
download | poky-76a281c870621f5b5608d098a70504c6069ccd11.tar.gz |
bitbake: 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].
(Bitbake rev: aba0dce57c889495ec5c13919991a060aeff65d2)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r-- | bitbake/lib/bb/providers.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index 637e1fab96..68c8d592d2 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py | |||
@@ -379,3 +379,29 @@ def getRuntimeProviders(dataCache, rdepend): | |||
379 | logger.debug(1, "Assuming %s is a dynamic package, but it may not exist" % rdepend) | 379 | logger.debug(1, "Assuming %s is a dynamic package, but it may not exist" % rdepend) |
380 | 380 | ||
381 | return rproviders | 381 | return rproviders |
382 | |||
383 | |||
384 | def buildWorldTargetList(dataCache): | ||
385 | """ | ||
386 | Build package list for "bitbake world" | ||
387 | """ | ||
388 | if dataCache.world_target: | ||
389 | return | ||
390 | |||
391 | logger.debug(1, "collating packages for \"world\"") | ||
392 | for f in dataCache.possible_world: | ||
393 | terminal = True | ||
394 | pn = dataCache.pkg_fn[f] | ||
395 | |||
396 | for p in dataCache.pn_provides[pn]: | ||
397 | if p.startswith('virtual/'): | ||
398 | logger.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p) | ||
399 | terminal = False | ||
400 | break | ||
401 | for pf in dataCache.providers[p]: | ||
402 | if dataCache.pkg_fn[pf] != pn: | ||
403 | logger.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p) | ||
404 | terminal = False | ||
405 | break | ||
406 | if terminal: | ||
407 | dataCache.world_target.add(pn) | ||