diff options
-rw-r--r-- | bitbake/lib/bb/cache.py | 25 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 10 | ||||
-rw-r--r-- | bitbake/lib/bb/siggen.py | 4 |
3 files changed, 34 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index e117fe56cb..96ab069180 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -238,6 +238,31 @@ class CoreRecipeInfo(RecipeInfoCommon): | |||
238 | cachedata.fakerootlogs[fn] = self.fakerootlogs | 238 | cachedata.fakerootlogs[fn] = self.fakerootlogs |
239 | cachedata.extradepsfunc[fn] = self.extradepsfunc | 239 | cachedata.extradepsfunc[fn] = self.extradepsfunc |
240 | 240 | ||
241 | |||
242 | class SiggenRecipeInfo(RecipeInfoCommon): | ||
243 | __slots__ = () | ||
244 | |||
245 | classname = "SiggenRecipeInfo" | ||
246 | cachefile = "bb_cache_" + classname +".dat" | ||
247 | # we don't want to show this information in graph files so don't set cachefields | ||
248 | #cachefields = [] | ||
249 | |||
250 | def __init__(self, filename, metadata): | ||
251 | self.siggen_gendeps = metadata.getVar("__siggen_gendeps", False) | ||
252 | self.siggen_varvals = metadata.getVar("__siggen_varvals", False) | ||
253 | self.siggen_taskdeps = metadata.getVar("__siggen_taskdeps", False) | ||
254 | |||
255 | @classmethod | ||
256 | def init_cacheData(cls, cachedata): | ||
257 | cachedata.siggen_taskdeps = {} | ||
258 | cachedata.siggen_gendeps = {} | ||
259 | cachedata.siggen_varvals = {} | ||
260 | |||
261 | def add_cacheData(self, cachedata, fn): | ||
262 | cachedata.siggen_gendeps[fn] = self.siggen_gendeps | ||
263 | cachedata.siggen_varvals[fn] = self.siggen_varvals | ||
264 | cachedata.siggen_taskdeps[fn] = self.siggen_taskdeps | ||
265 | |||
241 | def virtualfn2realfn(virtualfn): | 266 | def virtualfn2realfn(virtualfn): |
242 | """ | 267 | """ |
243 | Convert a virtual file name to a real one + the associated subclass keyword | 268 | Convert a virtual file name to a real one + the associated subclass keyword |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 5a5ba7fb70..4be95dd7fb 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -80,7 +80,7 @@ class SkippedPackage: | |||
80 | 80 | ||
81 | 81 | ||
82 | class CookerFeatures(object): | 82 | class CookerFeatures(object): |
83 | _feature_list = [HOB_EXTRA_CACHES, BASEDATASTORE_TRACKING, SEND_SANITYEVENTS] = list(range(3)) | 83 | _feature_list = [HOB_EXTRA_CACHES, BASEDATASTORE_TRACKING, SEND_SANITYEVENTS, RECIPE_SIGGEN_INFO] = list(range(4)) |
84 | 84 | ||
85 | def __init__(self): | 85 | def __init__(self): |
86 | self._features=set() | 86 | self._features=set() |
@@ -367,12 +367,12 @@ class BBCooker: | |||
367 | if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset: | 367 | if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset: |
368 | self.enableDataTracking() | 368 | self.enableDataTracking() |
369 | 369 | ||
370 | all_extra_cache_names = [] | 370 | caches_name_array = ['bb.cache:CoreRecipeInfo'] |
371 | # We hardcode all known cache types in a single place, here. | 371 | # We hardcode all known cache types in a single place, here. |
372 | if CookerFeatures.HOB_EXTRA_CACHES in self.featureset: | 372 | if CookerFeatures.HOB_EXTRA_CACHES in self.featureset: |
373 | all_extra_cache_names.append("bb.cache_extra:HobRecipeInfo") | 373 | caches_name_array.append("bb.cache_extra:HobRecipeInfo") |
374 | 374 | if CookerFeatures.RECIPE_SIGGEN_INFO in self.featureset: | |
375 | caches_name_array = ['bb.cache:CoreRecipeInfo'] + all_extra_cache_names | 375 | caches_name_array.append("bb.cache:SiggenRecipeInfo") |
376 | 376 | ||
377 | # At least CoreRecipeInfo will be loaded, so caches_array will never be empty! | 377 | # At least CoreRecipeInfo will be loaded, so caches_array will never be empty! |
378 | # This is the entry point, no further check needed! | 378 | # This is the entry point, no further check needed! |
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 34b71d596a..3731cd6b69 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -252,6 +252,10 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
252 | basehashes[task] = self.basehash[fn + ":" + task] | 252 | basehashes[task] = self.basehash[fn + ":" + task] |
253 | 253 | ||
254 | d.setVar("__siggen_basehashes", basehashes) | 254 | d.setVar("__siggen_basehashes", basehashes) |
255 | d.setVar("__siggen_gendeps", self.gendeps[fn]) | ||
256 | d.setVar("__siggen_varvals", self.lookupcache[fn]) | ||
257 | d.setVar("__siggen_taskdeps", self.taskdeps[fn]) | ||
258 | |||
255 | 259 | ||
256 | def postparsing_clean_cache(self): | 260 | def postparsing_clean_cache(self): |
257 | # | 261 | # |