diff options
Diffstat (limited to 'poky/bitbake/lib/bb/cookerdata.py')
-rw-r--r-- | poky/bitbake/lib/bb/cookerdata.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/poky/bitbake/lib/bb/cookerdata.py b/poky/bitbake/lib/bb/cookerdata.py index adde0e7444..42b8d64685 100644 --- a/poky/bitbake/lib/bb/cookerdata.py +++ b/poky/bitbake/lib/bb/cookerdata.py @@ -494,8 +494,9 @@ class CookerDataBuilder(object): return data @staticmethod - def _parse_recipe(bb_data, bbfile, appends, mc=''): + def _parse_recipe(bb_data, bbfile, appends, mc, layername): bb_data.setVar("__BBMULTICONFIG", mc) + bb_data.setVar("FILE_LAYERNAME", layername) bbfile_loc = os.path.abspath(os.path.dirname(bbfile)) bb.parse.cached_mtime_noerror(bbfile_loc) @@ -505,7 +506,7 @@ class CookerDataBuilder(object): bb_data = bb.parse.handle(bbfile, bb_data) return bb_data - def parseRecipeVariants(self, bbfile, appends, virtonly=False, mc=None): + def parseRecipeVariants(self, bbfile, appends, virtonly=False, mc=None, layername=None): """ Load and parse one .bb build file Return the data and whether parsing resulted in the file being skipped @@ -515,32 +516,32 @@ class CookerDataBuilder(object): (bbfile, virtual, mc) = bb.cache.virtualfn2realfn(bbfile) bb_data = self.mcdata[mc].createCopy() bb_data.setVar("__ONLYFINALISE", virtual or "default") - datastores = self._parse_recipe(bb_data, bbfile, appends, mc) + datastores = self._parse_recipe(bb_data, bbfile, appends, mc, layername) return datastores if mc is not None: bb_data = self.mcdata[mc].createCopy() - return self._parse_recipe(bb_data, bbfile, appends, mc) + return self._parse_recipe(bb_data, bbfile, appends, mc, layername) bb_data = self.data.createCopy() - datastores = self._parse_recipe(bb_data, bbfile, appends) + datastores = self._parse_recipe(bb_data, bbfile, appends, '', layername) for mc in self.mcdata: if not mc: continue bb_data = self.mcdata[mc].createCopy() - newstores = self._parse_recipe(bb_data, bbfile, appends, mc) + newstores = self._parse_recipe(bb_data, bbfile, appends, mc, layername) for ns in newstores: datastores["mc:%s:%s" % (mc, ns)] = newstores[ns] return datastores - def parseRecipe(self, virtualfn, appends): + def parseRecipe(self, virtualfn, appends, layername): """ Return a complete set of data for fn. To do this, we need to parse the file. """ logger.debug("Parsing %s (full)" % virtualfn) (fn, virtual, mc) = bb.cache.virtualfn2realfn(virtualfn) - bb_data = self.parseRecipeVariants(virtualfn, appends, virtonly=True) + bb_data = self.parseRecipeVariants(virtualfn, appends, virtonly=True, layername=layername) return bb_data[virtual] |