Modular DNF behavior specification requires that "Enabling a different stream of a module will automatically disable the old stream". Howewer, in Fedora rawhide DNF does not behave this way.
Example reproducer:
dnf -y module enable postgresql:9.6 dnf -y module enable postgresql:10
But DNF refuses to switch streams:
The operation would result in switching of module 'postgresql' stream '9.6' to stream '10' Error: It is not possible to switch enabled streams of a module. It is recommended to remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can enable the other stream.
That used to work before - DNF would disable the old stream and enable the new one, as documented in aforementioned docs. I would normally report this non-conformant behavior as a DNF bug, but I've been told that this is the new desired behaviour.
Can you please confirm whether this is intended behaviour, and if so, update documentation?
The documentation is wrong. DNF's behavior is correct. Late in development, we realized that stream switches have too many edge-cases to be generally-supportable. As a result, we opted to disallow them entirely for consistency.
@asamalik can you please update the documentation?
Sorry I'm quite confused, the modularity user documentation has that for a while now. Is there any other place that needs updating?
@asamalik Yes, see the original comment. There's a link to https://docs.fedoraproject.org/en-US/modularity/architecture/consuming/dnf-behavior/#_module_enablement that disagrees. It needs to be updated.
Ah! More coffee brewed, documentation updated!
Metadata Update from @asamalik: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Looks like its still there, even after I flush my browser cache.
The docs rebuild every hour at the top of the hour, then it takes up to an hour for the mirrors to pick it up.
So wait. To move the module to a new version, I have to install all of the packages from the old version, which will mean uninstalling all of the packages that depend on those packages? Then switch the module version and then what? Re-install all of the packages I had to uninstall to remove the old module version's content?
If that it what is being said, this is insane!!
Hrm. Can't edit comments. :-(
Looks like one can just disable without removing the module's content, despite the It is recommended to remove all installed content from the module... "recommendation" (I guess it is).
In dnf there is a new command - dnf module switch-to <moduler-spec> which will help you with switching. See: https://dnf.readthedocs.io/en/latest/command_ref.html#module-command-label
dnf module switch-to <moduler-spec>