Why does allowing package erasure cause DNF5 to pretend that no updates are available?

The undermentioned is an example:

    1. sudo dnf5 upgrade

    2. Updating and loading repositories:
      Repositories loaded.
      Problem: installed package firefox-langpacks-149.0.2-1.fc43.x86_64 requires firefox = 149.0.2-1.fc43, but none of the providers can be installed
        - cannot install both firefox-150.0-1.x86_64 from mozilla and firefox-149.0.2-1.fc43.x86_64 from @System
        - cannot install both firefox-150.0-1.x86_64 from mozilla and firefox-149.0.2-1.fc43.x86_64 from updates
        - cannot install the best update candidate for package firefox-langpacks-149.0.2-1.fc43.x86_64
        - cannot install the best update candidate for package firefox-149.0.2-1.fc43.x86_64
      
      Package                                                                                                       Arch                   Version                                                                                                       Repository                                                          Size
      Skipping packages with conflicts:
       firefox                                                                                                      x86_64                 150.0-1                                                                                                       mozilla                                                        300.5 MiB
      
      Nothing to do.
      
    1. sudo dnf5 upgrade --allowerasing

    2. Updating and loading repositories:
      Repositories loaded.
      Nothing to do.
      

Apologies if I should provide more context.

Notice that the conflict is between the mozilla repo and the fedora updates repo.

The issue should disappear when firefox-150 is released to the fedora updates repo.

It seems that you’ve added the Mozilla repo. This is not recommended if you want to avoid complications like this. Just remove the Mozilla repo and use Firefox that’s packaged in the Fedora repo.

But if you really want to use the Mozilla repo, it might help to set a priority on it. From Mozilla’s config guide:

sudo dnf config-manager addrepo --id=mozilla --set=baseurl=https://packages.mozilla.org/rpm/firefox --set=gpgkey=https://packages.mozilla.org/rpm/firefox/signing-key.gpg --set=gpgcheck=1 --set=repo_gpgcheck=0 --set=priority=10
sudo dnf makecache --refresh 

From my understanding of the presented outputs, the --allowerasing flag removes the conflicts, as it allows the solver to remove conflicting packages (firefox-langpacks in this case), but that would also remove firefox, as it has the former defined as weak dependency, which in turn would mean that there was nothing to upgrade (since no firefox package would be left on the system).

@yurislnx, I need Mozilla’s repository for non-stable RPMs (I use nightly for xdg-settings’s default-web-browser).

Can I invoke that without removing the repository first, or should I remove it first?