Skip to contentSkip to conversation

tinfoil: fix config_data mess up insane check while parsing multiple recipes

PATCH In review hongxu 2 participants 2 messages Apr 16, 2020

lore
Share & tools
lore

hongxu

author
#0 lore raw

PATCH 1/1 tinfoil: fix config_data mess up insane check while parsing multiple recipes

Since commit [tinfoil: Simplify remote datastore connections][1] and [tinfoil: Add back ability to parse on top of a datastore][2] applied, bitbake run command parseRecipeFile with param config_data.dsindex rather than config_data.

While calling tinfoil.parse_recipe_file() with one config_data (with the same config_data.dsindex) to parse multiple recipes, it will mess up insane check.

It broke update_layer.py on layerindex, here are the simplified steps:
[snip]
t= bb.tinfoil.Tinfoil()
t.prepare()
data = bb.data.createCopy(t.config_data)
fn = "path_to/oe-core/meta/recipes-graphics/images/core-image-clutter.bb" t.parse_recipe_file(fn, appends=False, config_data=data)
fn = "path_to/oe-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb" t.parse_recipe_file(fn, appends=False, config_data=data)

| File "path_to/oe-core/meta/classes/insane.bbclass", line 1303, in __anon_1304__path_to_oe_core_meta_classes_insane_bbclass
| bb.fatal("Fatal QA errors found, failing task.")
[snip]

In above failure, RDEPENDS is assigned `${PACKAGE_INSTALL} ${LINGUAS_INSTALL} ${IMAGE_INSTALL_DEBUGFS}' in core-image-clutter.bb, but it broke insane check on packagegroup-core-x11-base.bb

From commit [remotedata: enable transporting datastore from the client to the server][3], it create a new DataSmart to save receive_datastore's remote_data Similarly, make a copy of config_data(with different config_data.dsindex) could fix the issue.

[1] http://git.openembedded.org/bitbake/commit/?id=85e03a64dd0a4ebe71009ec4bdf4192c04a9786e
[2] http://git.openembedded.org/bitbake/commit/?id=4618da2094189e4d814b7d65672cb65c86c0626a
[3] http://git.openembedded.org/bitbake/commit/?id=784d2f1a024efe632fc9049ce5b78692d419d938

---
 lib/bb/tinfoil.py | 1 +
 1 file changed, 1 insertion(+)
lib/bb/tinfoil.py +1 -0
index 7d53608b2..8c9b6b8ca 100644
@@ -636,6 +636,7 @@ class Tinfoil:
             if appends and appendlist == []:
                 appends = False
             if config_data:
+                 config_data = bb.data.createCopy(config_data)
                  dscon = self.run_command('parseRecipeFile', fn, appends, appendlist, config_data.dsindex)
             else:
                 dscon = self.run_command('parseRecipeFile', fn, appends, appendlist)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Hongxu Jia

Since commit [tinfoil: Simplify remote datastore connections][1] and [tinfoil: Add back ability to parse on top of a datastore][2] applied,
bitbake run command parseRecipeFile with param config_data.dsindex rather
than config_data.

While calling tinfoil.parse_recipe_file() with one config_data (with the same
config_data.dsindex) to parse multiple recipes, it will mess up insane check.

Well spotted, thanks!

Cheers,

Richard