summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-11-21 02:35:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-23 12:06:06 +0000
commit370de0fa91cc07ddcdb9082becc4770534b01022 (patch)
tree151221573e730be0f0560cffa8dd8913078d0662 /bitbake/lib/bb/command.py
parent65bd1b3bf7084b82b512307ff043c29ea07fc915 (diff)
downloadpoky-370de0fa91cc07ddcdb9082becc4770534b01022.tar.gz
bitbake: command: Make parseRecipeFile() handle virtual recipes correctly
Running `devtool search gcc` would result in errors like this for virtual recipes: ERROR: When reparsing .../meta/recipes-devtools/gcc/libgcc-initial_13.2.bb:do_populate_sysroot, the basehash value changed from b1cd809ed98cef9db0fb1b17d34c4083e739c336f9d5619b89715b0294d81af5 to 44c2f92781dc4a20e98b7bb4724e204e64b101905fa75e71241a574b725997dc. The metadata is not deterministic and this needs to be fixed. ERROR: The following commands may help: ERROR: $ bitbake libgcc-initial -cdo_populate_sysroot -Snone ERROR: Then: ERROR: $ bitbake libgcc-initial -cdo_populate_sysroot -Sprintdiff The reason was the newly introduced :layer-<layername> override, which is used, e.g., in meta/classes-global/insane.bbclass to add the patch-status QA test only for the meta layer: ERROR_QA:append:layer-core = " patch-status" When tinfoil parsed the recipes using the parseRecipeFile() function, it failed to properly identify the layername for virtual recipes, which resulted in the error above. The correct thing to do is to make parseRecipeFile() call bb.cache.virtualfn2realfn() to convert the virtual filename into a real filename and virtual class. (Bitbake rev: da2aed134412f5de04d7b540f92d735983ad0108) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r--bitbake/lib/bb/command.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index f2ee587161..79b6c0738f 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -550,8 +550,8 @@ class CommandsSync:
550 and return a datastore object representing the environment 550 and return a datastore object representing the environment
551 for the recipe. 551 for the recipe.
552 """ 552 """
553 fn = params[0] 553 virtualfn = params[0]
554 mc = bb.runqueue.mc_from_tid(fn) 554 (fn, cls, mc) = bb.cache.virtualfn2realfn(virtualfn)
555 appends = params[1] 555 appends = params[1]
556 appendlist = params[2] 556 appendlist = params[2]
557 if len(params) > 3: 557 if len(params) > 3:
@@ -574,10 +574,10 @@ class CommandsSync:
574 if config_data: 574 if config_data:
575 # We have to use a different function here if we're passing in a datastore 575 # We have to use a different function here if we're passing in a datastore
576 # NOTE: we took a copy above, so we don't do it here again 576 # NOTE: we took a copy above, so we don't do it here again
577 envdata = command.cooker.databuilder._parse_recipe(config_data, fn, appendfiles, mc, layername)[''] 577 envdata = command.cooker.databuilder._parse_recipe(config_data, fn, appendfiles, mc, layername)[cls]
578 else: 578 else:
579 # Use the standard path 579 # Use the standard path
580 envdata = command.cooker.databuilder.parseRecipe(fn, appendfiles, layername) 580 envdata = command.cooker.databuilder.parseRecipe(virtualfn, appendfiles, layername)
581 idx = command.remotedatastores.store(envdata) 581 idx = command.remotedatastores.store(envdata)
582 return DataStoreConnectionHandle(idx) 582 return DataStoreConnectionHandle(idx)
583 parseRecipeFile.readonly = True 583 parseRecipeFile.readonly = True