Running on freshly updated (as of today) Fedora 40 sudo dnf5 --no-best --releasever 41 system-upgrade download
ends with the following error:
Transaction failed: Rpm transaction failed.
- file /etc/dnf/dnf.conf from install of libdnf5-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-data-4.21.1-1.fc40.noarch
- file /usr/lib64/qt6/plugins/kf6/kio/info.so from install of kio-extras-info-24.08.0-1.fc41.x86_64 conflicts with file from package kio-extras-24.08.0-1.fc40.x86_64
- file /usr/share/man/man5/dnf.conf.5.gz from install of dnf5-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-data-4.21.1-1.fc40.noarch
dnf5 on F41 comes with an empty etc/dnf/dnf.conf, it tries to overwrite your existing with a blank one.
You better rename it and let create dnf the new blank one. So you still have a copy.
On fedora f41 the system default seams to be defined in:
Thanks @vekruse for clarifications. That seams to be correct what you say. It is just so, that the OP has still dnf4 in use and the package who is interfering seams to be dnf-data-4.21.1-1.
Bringing up dnf5 on the level of F41 before upgrading would probably solve such kind of issues?
An other issue is that the sim-link is changing from dnf5 to dnf while on F40 the sim-link still is pointing to dnf4.
I am in a similar situation as the OP using dnf5 since it was announced that we will move to it. Now we get punished with such errors (or blessed, I do not know it exactly ).
In my case I just deleted the sim-link while being on F40 and created the link dnf pointing to dnf5.
Testing the OP’s strings brings no errors till the upgrades overview (y/n question). After confirm with yes i got some errors:
Errorlist relaying on dnf
Problem 12: cannot install both python3-libs-3.12.6-1.fc40.x86_64 and python3-libs-3.13.0~rc2-3.fc41.x86_64
- package python3-3.12.6-1.fc40.x86_64 requires python3-libs(x86-64) = 3.12.6-1.fc40, but none of the providers can be installed
- package python3-libdnf-0.73.3-1.fc41.x86_64 requires libpython3.13.so.1.0()(64bit), but none of the providers can be installed
- package proton-vpn-gtk-app-4.5.0-1.fc40.noarch requires python(abi) = 3.12, but none of the providers can be installed
- cannot install the best update candidate for package python3-libdnf-0.73.3-1.fc40.x86_64
- cannot install the best update candidate for package proton-vpn-gtk-app-4.5.0-1.fc40.noarch
Problem 13: package python3-3.12.6-1.fc40.x86_64 requires python3-libs(x86-64) = 3.12.6-1.fc40, but none of the providers can be installed
- cannot install both python3-libs-3.12.6-1.fc40.x86_64 and python3-libs-3.13.0~rc2-3.fc41.x86_64
- package python3-proton-core-0.3.3-1.fc40.noarch requires python(abi) = 3.12, but none of the providers can be installed
- package python3-libdnf5-5.2.6.2-1.fc41.x86_64 requires libpython3.13.so.1.0()(64bit), but none of the providers can be installed
- cannot install the best update candidate for package python3-proton-core-0.3.3-1.fc40.noarch
- cannot install the best update candidate for package python3-libdnf5-5.1.17-2.fc40.x86_64
The errors are not relaying on dnf4 I have, they are because I do have a proton package installed where is not default fedora. I will have to deactivate the repository to do a eventual upgrade. I will probably not upgrade this machine I made the test with, because I like to clean it up and use F41 stable then.
Objective to report my thoughts here is to share unexpected errors while make an upgrade. In my case in point of view of an dnf5 user on F40 / F39.
That would be resolved if dnf-data and libdnf5 are both upgraded in the same transaction, which would normally be the case unless some other requirements prevent one of the packages to be upgraded.
$ ls -l /usr/bin/dnf*
lrwxrwxrwx. 1 root root 5 Aug 14 19:00 /usr/bin/dnf -> dnf-3
-rwxr-xr-x. 1 root root 1981 Aug 14 19:00 /usr/bin/dnf-3
lrwxrwxrwx. 1 root root 5 Aug 14 19:00 /usr/bin/dnf4 -> dnf-3
Note that dnf is a symlink to the binary that is actually used.
dnf3 is python based while dnf5 is c++ based.
If you have dnf5 installed and you wish to use dnf5 when using the dnf command you must ensure that the symlink points to the proper binary . The ln command is used to create a symlink and the man page tells how to do so.
You can use the ls command as I show above to find out what is happening. If dnf still is linked to dnf3 then either use the command dnf5 or remove the existing symlink and create a new one that now links to the dnf5 command.
That would be resolved if dnf-data and libdnf5 are both upgraded in the same transaction, which would normally be the case unless some other requirements prevent one of the packages to be upgraded.
I guess sudo dnf5 --no-best --releasever 41 system-upgrade download makes it clear that both dnf-data and libdnf5 are indeed going to be upgraded in the same transaction yet the command ends with error about conflicts.
Not using the option earlier resulted in many conflicts and suggestion to add this option. However I then removed some packages trying to minimize number of conflicts and now the output with and without --no-best is the same (shown in my question).
Update to the above. I think the reason for --no-best having no effect was due to best=False set in /etc/dnf/dnf.conf. After removing it this is what I get:
$ sudo dnf5 --releasever 41 system-upgrade download
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Problem 1: package docker-cli-27.2.0-1.fc41.x86_64 conflicts with podman-docker provided by podman-docker-5:5.2.2-1.fc41.noarch
- package docker-compose-2.29.2-1.fc41.x86_64 requires docker-cli, but none of the providers can be installed
- cannot install the best update candidate for package podman-docker-5:5.2.2-1.fc40.noarch
- cannot install the best update candidate for package docker-compose-1.29.2-12.fc40.noarch
Problem 2: package docker-compose-2.29.2-1.fc41.x86_64 requires docker-cli, but none of the providers can be installed
- package docker-cli-27.2.0-1.fc41.x86_64 conflicts with podman-docker provided by podman-docker-5:5.2.2-1.fc41.noarch
- problem with installed package
- problem with installed package
- package docker-compose-1.29.2-12.fc40.noarch requires python(abi) = 3.12, but none of the providers can be installed
- package podman-docker-5:5.2.2-1.fc40.noarch requires podman = 5:5.2.2-1.fc40, but none of the providers can be installed
- cannot install both python3-3.12.6-1.fc40.x86_64 and python3-3.13.0~rc2-3.fc41.x86_64
- cannot install both podman-5:5.2.2-1.fc40.x86_64 and podman-5:5.2.2-1.fc41.x86_64
- cannot install the best update candidate for package python3-3.12.6-1.fc40.x86_64
- cannot install the best update candidate for package podman-5:5.2.2-1.fc40.x86_64
You can try to add to command line:
--no-best to not limit the transaction to the best candidates
This looks like a bug with the podman package.
I was able to update after removing podman-docker, updating and then doing sudo dnf install podman-docker --allowerasing
But you have dnf-data installed, and I was suggesting to download that at least so you would have dnf-data-4.21.0-1.fc40.noarch.rpm installed instead of dnf-data-4.21.1-1.fc40.noarch.
I tried symlink of dnf to dnf5, and then perform system update, but still getting the same errors:
Transaction failed: Rpm transaction failed.
- file /etc/dnf/dnf.conf from install of libdnf5-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-data-4.21.1-1.fc40.noarch
- file /usr/share/man/man5/dnf.conf.5.gz from install of dnf5-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-data-4.21.1-1.fc40.noarch
- file /usr/share/man/man8/dnf-download.8.gz from install of dnf5-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-system-upgrade.8.gz from install of dnf5-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-builddep.8.gz from install of dnf5-plugins-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-changelog.8.gz from install of dnf5-plugins-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-config-manager.8.gz from install of dnf5-plugins-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-copr.8.gz from install of dnf5-plugins-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-needs-restarting.8.gz from install of dnf5-plugins-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch
- file /usr/share/man/man8/dnf-repoclosure.8.gz from install of dnf5-plugins-5.2.6.2-1.fc41.x86_64 conflicts with file from package dnf-plugins-core-4.9.0-1.fc40.noarch