diff options
| author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2023-11-21 03:09:50 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-23 12:06:06 +0000 |
| commit | 02c2d31d4d842cd8247cc36abb4342514cfc3302 (patch) | |
| tree | 06d2e9dc6df0caa8a6ffd43718254a7f4b673c2d /bitbake/lib/bb/cookerdata.py | |
| parent | 370de0fa91cc07ddcdb9082becc4770534b01022 (diff) | |
| download | poky-02c2d31d4d842cd8247cc36abb4342514cfc3302.tar.gz | |
bitbake: cookerdata: Be consistent with what type bb_data represents
In _parse_recipe(), bb_data was initially a datastore object, but then
after the call to bb.parse.handle() it was all of a sudden turned into a
dict of variant:datastore pairs. At the same time, parseRecipeVariants()
used bb_data for datastore objects, while parseRecipe() used it for the
dicts of variant:datastore pairs.
Change these functions to consistently use "bb_data" for datastore
objects and use "datastores" for the dicts of variant:datastore pairs.
(Bitbake rev: ed0f94c037476efd465db87726b2480406076beb)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
| -rw-r--r-- | bitbake/lib/bb/cookerdata.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 42b8d64685..0649e40995 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
| @@ -503,8 +503,8 @@ class CookerDataBuilder(object): | |||
| 503 | 503 | ||
| 504 | if appends: | 504 | if appends: |
| 505 | bb_data.setVar('__BBAPPEND', " ".join(appends)) | 505 | bb_data.setVar('__BBAPPEND', " ".join(appends)) |
| 506 | bb_data = bb.parse.handle(bbfile, bb_data) | 506 | |
| 507 | return bb_data | 507 | return bb.parse.handle(bbfile, bb_data) |
| 508 | 508 | ||
| 509 | def parseRecipeVariants(self, bbfile, appends, virtonly=False, mc=None, layername=None): | 509 | def parseRecipeVariants(self, bbfile, appends, virtonly=False, mc=None, layername=None): |
| 510 | """ | 510 | """ |
| @@ -516,8 +516,7 @@ class CookerDataBuilder(object): | |||
| 516 | (bbfile, virtual, mc) = bb.cache.virtualfn2realfn(bbfile) | 516 | (bbfile, virtual, mc) = bb.cache.virtualfn2realfn(bbfile) |
| 517 | bb_data = self.mcdata[mc].createCopy() | 517 | bb_data = self.mcdata[mc].createCopy() |
| 518 | bb_data.setVar("__ONLYFINALISE", virtual or "default") | 518 | bb_data.setVar("__ONLYFINALISE", virtual or "default") |
| 519 | datastores = self._parse_recipe(bb_data, bbfile, appends, mc, layername) | 519 | return self._parse_recipe(bb_data, bbfile, appends, mc, layername) |
| 520 | return datastores | ||
| 521 | 520 | ||
| 522 | if mc is not None: | 521 | if mc is not None: |
| 523 | bb_data = self.mcdata[mc].createCopy() | 522 | bb_data = self.mcdata[mc].createCopy() |
| @@ -543,5 +542,5 @@ class CookerDataBuilder(object): | |||
| 543 | """ | 542 | """ |
| 544 | logger.debug("Parsing %s (full)" % virtualfn) | 543 | logger.debug("Parsing %s (full)" % virtualfn) |
| 545 | (fn, virtual, mc) = bb.cache.virtualfn2realfn(virtualfn) | 544 | (fn, virtual, mc) = bb.cache.virtualfn2realfn(virtualfn) |
| 546 | bb_data = self.parseRecipeVariants(virtualfn, appends, virtonly=True, layername=layername) | 545 | datastores = self.parseRecipeVariants(virtualfn, appends, virtonly=True, layername=layername) |
| 547 | return bb_data[virtual] | 546 | return datastores[virtual] |
