I’ve heard a couple of folks report that they tried updating a Rawhide system or container and it failed with:
Problem: The operation would result in removing the following protected packages: dnf
The problem seems to be caused by doing the upgrade with an older dnf installed. dnf-4.15.1-1.fc39 was tagged into Rawhide on May 18th, and it dropped the protection of dnf (and yum). So there was a month or so where the ‘current’ dnf package you got on Rawhide update dropped the protection of dnf itself, and if you updated to that version before the dnf5-by-default update arrived this week, your upgrade to dnf5 should go fine.
However, if you didn’t update your system to dnf-4.15.1-1.fc39, you’ll encounter this problem when you try to update now, because the older dnf build you have installed still considers itself protected.
The most reliable workaround for this, as suggested by the DNF team (thanks!), is to add --setopt=protected_packages=,
to your update command. This overrides the list of “protected packages” to be empty, and should allow the update to proceed.
It’s also been reported that using the pre-switchover dnf5 to do the switchover upgrade (the one that makes dnf5 the default and removes dnf) may not work. If it doesn’t, then just use dnf to run that upgrade instead.
Sorry for any trouble caused by this!