#1490 get_base_module_mmds returns base modules from all dependencies entries
Closed: Invalid 4 years ago by mprahl. Opened 4 years ago by mprahl.

While reading the code in get_base_module_mmds, I noticed that it gets the compatible base modules for all dependencies entries (for deps in mmd.get_dependencies():).

The function get_mmds_required_by_module_recursively which calls get_base_module_mmds, passes in the result of get_base_module_mmds to _get_mmds_from_requires for each dependencies entries. This means that the compatible base modules from mmd.get_dependencies()[1] affect which modules get picked when getting the buildrequires for mmd.get_dependencies()[0] and vice-versa.

This doesn't seem right to me. @jkaluza, could you provide your guidance?


I'm not sure if that's an actual issue or not. Your assumption is correct and we might get unneeded dependencies, but MMDResolver code constructs the dependencies with respect to dependencies entries so those unneeded modules should not be picked up in the end, because they won't match the dependencies constructed for input MMD by MMDResolver.

But on the other side, improving the get_base_module_mmds could save time while fetching those unneeded modules and also eliminates any possible issues in MMDResolver. I think the change won't be hard. We could for example group the results of get_base_module_mmds by dependencies index. That function is called only from two places, so it's easy to change it.

Thanks @jkaluza. I'll close this since it's not really an issue.

Metadata Update from @mprahl:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata