From 76a281c870621f5b5608d098a70504c6069ccd11 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Sat, 23 Jan 2016 00:52:21 +1300 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 74190ec9a7..9c58d95006 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1109,28 +1109,6 @@ class BBCooker: tree = self.generatePkgDepTreeData(pkgs, 'build') bb.event.fire(bb.event.TargetsTreeGenerated(tree), self.data) - def buildWorldTargetList(self): - """ - Build package list for "bitbake world" - """ - parselog.debug(1, "collating packages for \"world\"") - for f in self.recipecache.possible_world: - terminal = True - pn = self.recipecache.pkg_fn[f] - - for p in self.recipecache.pn_provides[pn]: - if p.startswith('virtual/'): - parselog.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p) - terminal = False - break - for pf in self.recipecache.providers[p]: - if self.recipecache.pkg_fn[pf] != pn: - parselog.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p) - terminal = False - break - if terminal: - self.recipecache.world_target.add(pn) - def interactiveMode( self ): """Drop off into a shell""" try: @@ -1591,7 +1569,7 @@ class BBCooker: parselog.warn("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg) if 'world' in pkgs_to_build: - self.buildWorldTargetList() + bb.providers.buildWorldTargetList(self.recipecache) pkgs_to_build.remove('world') for t in self.recipecache.world_target: pkgs_to_build.append(t) -- cgit 1.2.3-korg