Skip to contentSkip to conversation

Layerindex broken by recent change to bitbake tinfoil

DISCUSSION Konrad Scherer 3 participants 4 messages Mar 31, 2020 – Apr 5, 2020

lore
Share & tools
lore
#0 lore raw

Hello,

The following commit to bitbake breaks recipe parsing in the layerindex:

commit f2341dc46b6abfc08a4d01c7abdd3d4630577999

Author: Richard Purdie <[email protected]>
Date:   Mon Mar 23 12:30:04 2020 +0000

tinfoil: Drop parse_recipe_file custom datastore support

The layerindex uses the tinfoil.parse_recipe_file call to build its database:

https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/tree/layerindex/update_layer.py#n105

now fails with the following error message:

parse_recipe_file() got an unexpected keyword argument 'config_data'

When I remove the config_data argument from the layerindex code the parsing continues, but I don't know either code base well enough to determine if this is the correct solution. How best to resolve this problem?

Thank you!

Signature · 1 line
Konrad Scherer, MTS, Linux Products Group, Wind River
#1 lore raw
Quoted 18 lines · Konrad Scherer

Hello,

The following commit to bitbake breaks recipe parsing in the layerindex:

commit f2341dc46b6abfc08a4d01c7abdd3d4630577999

Author: Richard Purdie <[email protected]>
Date:   Mon Mar 23 12:30:04 2020 +0000

tinfoil: Drop parse_recipe_file custom datastore support

The layerindex uses the tinfoil.parse_recipe_file call to build its database:

https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/tree/layerindex/update_layer.py#n105

now fails with the following error message:

Quoted 7 lines

parse_recipe_file() got an unexpected keyword argument 'config_data'

When I remove the config_data argument from the layerindex code the parsing continues, but I don't
know either code base well enough to determine if this is the correct solution. How best to resolve
this problem?

Adding Paul to this conversation.

From my reading of the code, config_data comes from config_data_copy and is most unmodified. The only place it is modified is in update_distro_conf_file() which does:

d = utils.parse_conf(path, d)

which amounts to calling bb.parse.handler() on it.

Looking at the code, I'm not sure its intentional that those changes are preserved in config_data_copy.

Paul: Should those distro changes persist in config_data_copy?

If not, the fix is easy and we just remove the parameter. If wanted, that is harder.

Cheers,

Richard

#2 lore raw
Quoted 36 lines · On Wednesday, 1 April 2020 02:25:11 NZDT Richard Purdie wrote:
Quoted 17 lines · Konrad Scherer

The following commit to bitbake breaks recipe parsing in the layerindex:

commit f2341dc46b6abfc08a4d01c7abdd3d4630577999

Author: Richard Purdie <[email protected]>
Date:   Mon Mar 23 12:30:04 2020 +0000

tinfoil: Drop parse_recipe_file custom datastore support

The layerindex uses the tinfoil.parse_recipe_file call to build its database:

https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/tree/layerindex/
update_layer.py#n105

now fails with the following error message:

Quoted 7 lines

parse_recipe_file() got an unexpected keyword argument 'config_data'

When I remove the config_data argument from the layerindex code the parsing continues, but I don't
know either code base well enough to determine if this is the correct solution. How best to resolve
this problem?

Adding Paul to this conversation.

From my reading of the code, config_data comes from config_data_copy and is most unmodified. The only place it is modified is in update_distro_conf_file() which does:

d = utils.parse_conf(path, d)

which amounts to calling bb.parse.handler() on it.

Quoted 7 lines

Looking at the code, I'm not sure its intentional that those changes are preserved in config_data_copy.

Paul: Should those distro changes persist in config_data_copy?

If not, the fix is easy and we just remove the parameter. If wanted, that is harder.

Hang on, leaving the distro conf handling aside for a moment, recipeparse.setup_layer() is where config_data_copy comes from and it is being modified in there - we are parsing conf/layer.conf from the layer and all of its dependencies. If we can't pass that into the recipe parsing then we won't have things from layer.conf, which can turn out to be pretty important for some layers.

Sorry, I missed this when we reviewed the changes, that's my fault :( I'll have to see what I can come up with in terms of a solution.

Paul

#3 lore raw
Quoted 52 lines · Paul Eggleton
Quoted 36 lines · On Wednesday, 1 April 2020 02:25:11 NZDT Richard Purdie wrote:
Quoted 17 lines · Konrad Scherer

The following commit to bitbake breaks recipe parsing in the layerindex:

commit f2341dc46b6abfc08a4d01c7abdd3d4630577999

Author: Richard Purdie <[email protected]>
Date:   Mon Mar 23 12:30:04 2020 +0000

tinfoil: Drop parse_recipe_file custom datastore support

The layerindex uses the tinfoil.parse_recipe_file call to build its database:

https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/tree/layerindex/
update_layer.py#n105

now fails with the following error message:

Quoted 7 lines

parse_recipe_file() got an unexpected keyword argument 'config_data'

When I remove the config_data argument from the layerindex code the parsing continues, but I don't
know either code base well enough to determine if this is the correct solution. How best to resolve
this problem?

Adding Paul to this conversation.

From my reading of the code, config_data comes from config_data_copy and is most unmodified. The only place it is modified is in update_distro_conf_file() which does:

d = utils.parse_conf(path, d)

which amounts to calling bb.parse.handler() on it.

Quoted 7 lines

Looking at the code, I'm not sure its intentional that those changes are preserved in config_data_copy.

Paul: Should those distro changes persist in config_data_copy?

If not, the fix is easy and we just remove the parameter. If wanted, that is harder.

Hang on, leaving the distro conf handling aside for a moment, recipeparse.setup_layer() is where config_data_copy comes from and it is being modified in there - we are parsing conf/layer.conf from the layer and all of its dependencies. If we can't pass that into the recipe parsing then we won't have things from layer.conf, which can turn out to be pretty important for some layers.

Quoted 2 lines

Sorry, I missed this when we reviewed the changes, that's my fault :( I'll have to see what I can come up with in terms of a solution.

I've sent a patch which I think resolves the issue, thankfully it worked out simpler than I was expecting.

Cheers,

Richard