When installing a module FOO that has dependencies on module BAR, dnf should mark the module BAR as installed. There was some talk of this happening by having the depsolver mark rpms from module BAR to be installed, and then working back from that to mark BAR as an install (due to the rpms being installed from it). However I'm not sure this is enough for el8 (Eg. compat. repos.)
James, should it install or just enable the BAR module? I think it would be sufficient if the package dependencies are available for solving, right? Martin, does PR#951 cover this? It looks like it to me: https://github.com/rpm-software-management/dnf/pull/951
Yes, it is written in description of PR: "enable module runtime dependencies, when enabling module:stream" RPM dependencies are installed, that is done on RPM level. And if I am correct, module cannot be installed, so module dependencies are just enabled. If you want dnf to install module profile, dnf need information, which profile to install.
Fixed by https://github.com/rpm-software-management/dnf/pull/951