Description of problem: DNF currently will search for a package by its name+host arch, then name, then capabilities (Provides and whatnot). This causes a problem in Mageia, because the way our library packages are named can cause DNF to pick the wrong thing at times. For example, our library devel packages are usually named with the format %{_lib}%{shortname}-devel, and often times they Provide the Fedora variant of the name. For example, lib64solv-devel Provides libsolv-devel. However, doing "dnf builddep hawkey.spec" doesn't necessarily pull in lib64solv-devel, especially if the user has both 32-bit and 64-bit repos (as is the norm). This leads to all kinds of problems when trying to install or build packages, as dependencies could be improperly pulled in. Essentially, I'd like to ask for two things: 1) a configuration option to switch the default behavior from name -> Provides to Provides -> name and 2) a runtime switch to have the same effect temporarily. Version-Release number of selected component (if applicable): dnf-1.1.8-2.mga6 (= dnf-1.1.8-1.fc24) dnf-plugins-core-0.1.20-1.mga6 (= dnf-plugins-core-0.1.20-1.fc24) Additional info: This capability exists in Zypper as the "-C" option when using install. This changes Zypper to use capabilities (process Provides before the actual name), so it appears libsolv can do it, so DNF should be able to, as well. This issue was discovered by a Mageia user, and the bug is referenced in the "See Also" field.
*** This bug has been marked as a duplicate of bug 1096506 ***
After speaking to mls about the issue, it turns out it's actually a DNF bug that indicates that it's doing a mix of "job install" and "job install provides" when it should be doing exclusively "job install provides" and resolving that correctly. So this is now actually a bug rather than an enhancement request.
Created attachment 1158308 [details] DNF debugsolver data for the builddep issue I've also managed to reproduce the test case of the original issue with builddep. I've provided four debugsolver data sets, two with both 32-bit and 64-bit repositories enabled, and two with just 64-bit repositories enabled. One of each kind has "--best --allowerasing" enabled, and the other set does not. The source RPM this issue showed up in was qemu-2.6.0-3.mga6.src.rpm, which can be retrieved from https://mirrors.kernel.org/mageia/distrib/cauldron/SRPMS/core/release/qemu-2.6.0-3.mga6.src.rpm
We should just change reordering of "pkgspec" analysis in bug 1096506 (Subject().get_best_*) then builddep would search by provides at first.
Updating this ticket to use the new external bug tracker for Mageia bugs.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I have created a PR that will help. It do not allow to customize the searching characteristic by options but it change searching priorities where first is taken in account provides and if no provides than the name. If someone wants to prefer another package, it chan be customized by ver.release or using excludes. Please can you comment the PR or the bug-report if this changes are acceptable. https://github.com/rpm-software-management/dnf/pull/603
There is a new PR: https://github.com/rpm-software-management/dnf/pull/609
Neal, can you check if it starts working properly? If yes -- CLOSED RAWHIDE If no -- NEW
The acceptance of https://github.com/rpm-software-management/libhif/pull/224 made this bug return. Jaroslav, can you figure out how to fix this for good?
Wait, nevermind. My bad, it's fine.
https://github.com/rpm-software-management/dnf-plugins-core/pull/204
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
dnf-plugins-core-1.1.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f56311f5dd
dnf-plugins-core-1.1.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f56311f5dd
dnf-plugins-core-1.1.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.