summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cache.py22
-rw-r--r--bitbake/lib/bb/cooker.py8
2 files changed, 19 insertions, 11 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index b34bfa9b5a..df78d5b701 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -328,7 +328,7 @@ class NoCache(object):
328 bb_data = self.load_bbfile(virtualfn, appends, virtonly=True) 328 bb_data = self.load_bbfile(virtualfn, appends, virtonly=True)
329 return bb_data[virtual] 329 return bb_data[virtual]
330 330
331 def load_bbfile(self, bbfile, appends, virtonly = False): 331 def load_bbfile(self, bbfile, appends, virtonly = False, mc=None):
332 """ 332 """
333 Load and parse one .bb build file 333 Load and parse one .bb build file
334 Return the data and whether parsing resulted in the file being skipped 334 Return the data and whether parsing resulted in the file being skipped
@@ -341,6 +341,10 @@ class NoCache(object):
341 datastores = parse_recipe(bb_data, bbfile, appends, mc) 341 datastores = parse_recipe(bb_data, bbfile, appends, mc)
342 return datastores 342 return datastores
343 343
344 if mc is not None:
345 bb_data = self.databuilder.mcdata[mc].createCopy()
346 return parse_recipe(bb_data, bbfile, appends, mc)
347
344 bb_data = self.data.createCopy() 348 bb_data = self.data.createCopy()
345 datastores = parse_recipe(bb_data, bbfile, appends) 349 datastores = parse_recipe(bb_data, bbfile, appends)
346 350
@@ -500,7 +504,7 @@ class Cache(NoCache):
500 """Parse the specified filename, returning the recipe information""" 504 """Parse the specified filename, returning the recipe information"""
501 self.logger.debug(1, "Parsing %s", filename) 505 self.logger.debug(1, "Parsing %s", filename)
502 infos = [] 506 infos = []
503 datastores = self.load_bbfile(filename, appends) 507 datastores = self.load_bbfile(filename, appends, mc=self.mc)
504 depends = [] 508 depends = []
505 variants = [] 509 variants = []
506 # Process the "real" fn last so we can store variants list 510 # Process the "real" fn last so we can store variants list
@@ -720,8 +724,18 @@ class Cache(NoCache):
720 return bb.parse.cached_mtime_noerror(cachefile) 724 return bb.parse.cached_mtime_noerror(cachefile)
721 725
722 def add_info(self, filename, info_array, cacheData, parsed=None, watcher=None): 726 def add_info(self, filename, info_array, cacheData, parsed=None, watcher=None):
723 if cacheData is not None and isinstance(info_array[0], CoreRecipeInfo) and (not info_array[0].skipped): 727 if self.mc is not None:
724 cacheData.add_from_recipeinfo(filename, info_array) 728 (fn, cls, mc) = virtualfn2realfn(filename)
729 if mc:
730 self.logger.error("Unexpected multiconfig %s", virtualfn)
731 return
732
733 vfn = realfn2virtual(fn, cls, self.mc)
734 else:
735 vfn = filename
736
737 if isinstance(info_array[0], CoreRecipeInfo) and (not info_array[0].skipped):
738 cacheData.add_from_recipeinfo(vfn, info_array)
725 739
726 if watcher: 740 if watcher:
727 watcher(info_array[0].file_depends) 741 watcher(info_array[0].file_depends)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 50526d52b2..effd02442c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2199,13 +2199,7 @@ class CookerParser(object):
2199 if info_array[0].skipped: 2199 if info_array[0].skipped:
2200 self.skipped += 1 2200 self.skipped += 1
2201 self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0]) 2201 self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0])
2202 (fn, cls, fnmc) = bb.cache.virtualfn2realfn(virtualfn) 2202 self.bb_caches[mc].add_info(virtualfn, info_array, self.cooker.recipecaches[mc],
2203
2204 if fnmc == mc:
2205 cache = self.cooker.recipecaches[mc]
2206 else:
2207 cache = None
2208 self.bb_caches[mc].add_info(virtualfn, info_array, cache,
2209 parsed=parsed, watcher = self.cooker.add_filewatch) 2203 parsed=parsed, watcher = self.cooker.add_filewatch)
2210 return True 2204 return True
2211 2205