summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.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:44 +0000
commit76a281c870621f5b5608d098a70504c6069ccd11 (patch)
tree424154ecbd9cff7be886487d5c5c23bc16259a87 /bitbake/lib/bb/cache.py
parent11a1f496304b5273a13dac0acb27815ecfcb8714 (diff)
downloadpoky-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/cache.py')
-rw-r--r--bitbake/lib/bb/cache.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 83f2ff1561..8485eb467a 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -43,7 +43,7 @@ except ImportError:
43 logger.info("Importing cPickle failed. " 43 logger.info("Importing cPickle failed. "
44 "Falling back to a very slow implementation.") 44 "Falling back to a very slow implementation.")
45 45
46__cache_version__ = "148" 46__cache_version__ = "149"
47 47
48def getCacheFile(path, filename, data_hash): 48def getCacheFile(path, filename, data_hash):
49 return os.path.join(path, filename + "." + data_hash) 49 return os.path.join(path, filename + "." + data_hash)
@@ -144,6 +144,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
144 self.fakerootenv = self.getvar('FAKEROOTENV', metadata) 144 self.fakerootenv = self.getvar('FAKEROOTENV', metadata)
145 self.fakerootdirs = self.getvar('FAKEROOTDIRS', metadata) 145 self.fakerootdirs = self.getvar('FAKEROOTDIRS', metadata)
146 self.fakerootnoenv = self.getvar('FAKEROOTNOENV', metadata) 146 self.fakerootnoenv = self.getvar('FAKEROOTNOENV', metadata)
147 self.extradepsfunc = self.getvar('calculate_extra_depends', metadata)
147 148
148 @classmethod 149 @classmethod
149 def init_cacheData(cls, cachedata): 150 def init_cacheData(cls, cachedata):
@@ -179,6 +180,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
179 cachedata.fakerootenv = {} 180 cachedata.fakerootenv = {}
180 cachedata.fakerootnoenv = {} 181 cachedata.fakerootnoenv = {}
181 cachedata.fakerootdirs = {} 182 cachedata.fakerootdirs = {}
183 cachedata.extradepsfunc = {}
182 184
183 def add_cacheData(self, cachedata, fn): 185 def add_cacheData(self, cachedata, fn):
184 cachedata.task_deps[fn] = self.task_deps 186 cachedata.task_deps[fn] = self.task_deps
@@ -246,6 +248,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
246 cachedata.fakerootenv[fn] = self.fakerootenv 248 cachedata.fakerootenv[fn] = self.fakerootenv
247 cachedata.fakerootnoenv[fn] = self.fakerootnoenv 249 cachedata.fakerootnoenv[fn] = self.fakerootnoenv
248 cachedata.fakerootdirs[fn] = self.fakerootdirs 250 cachedata.fakerootdirs[fn] = self.fakerootdirs
251 cachedata.extradepsfunc[fn] = self.extradepsfunc
249 252
250 253
251 254