Description of problem: When doing a dnf list or download command, the repository priority is not used. However, the actual install will install the package from the correct repository. Version-Release number of selected component (if applicable): Current versions from Fedora 31: dnf.noarch 4.2.18-1.fc31 dnf-plugins-core.noarch 4.0.13-1.fc31 libdnf.x86_64 0.43.1-1.fc31 libmodulemd.x86_64 2.8.3-1.fc31 librepo.x86_64 1.11.1-1.fc31 libsolv.x86_64 0.7.11-1.fc31 I also played around with experimental builds from koji, but got the same results. How reproducible: 100% Steps to Reproduce: In general terms, find a package with a higher version in a repository with a lower priority (higher priority value). 'dnf list' and 'dnf download' will both provide the higher version from lower priority repository. However, 'dnf install' will correctly provide the lower versioned package from the higher priority repository. An example: 1. Currently, Fedora 31 'updates' repository has youtube-dl version 2020.01.24, updates-testing has version 2019.09.12.1. 2. Remove youtube-dl from system if installed. 3. Edit fedora-updates-testing.repo to make 'updates-testing' priority=1 (making the repository with the lower version higher priority). 4. dnf --disablerepo=* --enablerepo=updates,updates-testing list youtube-dl 5. dnf --disablerepo=* --enablerepo=updates,updates-testing download --url youtube-dl 6. dnf --disablerepo=* --enablerepo=updates,updates-testing install youtube-dl Actual results: The list and download commands both provide version 2020.01.24. The install command provides version 2019.09.12.1. Expected results: All three commands should provide the 2019.09.12.1 version. Additional info: My actual use-case involves dnf download with --resolve --alldeps in an empty root to populate an install tree. This functionality is vital. Priorities worked correctly with 'yumdownloader' on Centos 6.
Probably this https://github.com/rpm-software-management/dnf/pull/1554 could be helpful.
Thank you, Jaroslav. It did help. PR libdnf: https://github.com/rpm-software-management/libdnf/pull/902 PR dnf (list command): https://github.com/rpm-software-management/dnf/pull/1600 PR dnf-plugins-core (download command): https://github.com/rpm-software-management/dnf-plugins-core/pull/389 Tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/800
FEDORA-2020-d51dbe83a9 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d51dbe83a9
FEDORA-2020-d51dbe83a9 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-d51dbe83a9` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d51dbe83a9 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-d51dbe83a9 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.