Upgrade from Fedora 30 to 31: Cannot enable multiple streams for module 'ant'

Dummies guide to disabling modular repos

I wasn't sure exactly what this comment from dbdemon meant:

It seems I had to disable the "Fedora Modular" repos.

So a bit of searching brings up this article on How to use Fedora / RHEL 8 Modular Repository.

You can list the modular repos that you have installed by:

dnf module list --enabled

I got this output:

Docker CE Stable - x86_64                        12 kB/s | 9.8 kB     00:00    
...
Fedora Modular 30 - x86_64
Name    Stream         Profiles    Summary                                      
gimp    2.10 [d][e]    default [d] GIMP                                         
                       , devel     
ripgrep latest [d][e]  default [d] Line oriented search tool using Rust's regex 
                                   library

Fedora Modular 30 - x86_64 - Updates
Name    Stream         Profiles    Summary                                      
fd-find rolling [d][e] default [d] Simple, fast and user-friendly alternative to
                                    find
gimp    2.10 [d][e]    default [d] GIMP                                         
                       , devel     
ripgrep latest [d][e]  default [d] Line oriented search tool using Rust's regex 
                                   library

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Note: The bits at the end tell you which modules you have installed. However I'm pretty sure that I didn't intentionally install these modular repos, it just happens that some developers have enabled them. I just ran sudo dnf install ripgrep and it installed the modular repo.

So from this list I have, fd-find, ripgrep and gimp installed as modules.

I can then disable these for example for ripgrep:

sudo dnf module disable ripgrep

You just need to do the same for which ever modules you have listed.

Once I had disabled my 3 modules I could run the Fedora upgrade without problem:

sudo dnf system-upgrade download --releasever=31

According to https://bugzilla.redhat.com/show_bug.cgi?id=1811234, disabling the problematic modules works, but you'll want to remember to re-enable them after the upgrade. A possibly simpler solution mentioned there is:

sudo dnf module reset '*'

Then during installation it'll say something like:

Enabling module streams:
 gimp                                          2.10                                                     
 maven                                         3.5                                                      
 meson                                         latest                                                   
 ninja                                         latest                                                   
 ripgrep                                       latest                                                   

I don't fully understand how it works, but from https://docs.fedoraproject.org/en-US/modularity/using-modules-switching-streams/ it seems that a module can have at most 1 "stream" selected, and reset clears that selection allowing another stream to be chosen?


If you have a problem with any module like 'ant' or 'maven', and removing module doesn't work, try to reset the module with command:

"dnf module reset ", exmaple: dnf module reset maven

It worked for me with "maven" module, same error: terminate called after throwing an instance of 'libdnf::ModulePackageContainer::EnableMultipleStreamsException' what(): Cannot enable multiple streams for module 'maven'