Bug 1332830 - DNF builddep is not consistently installing packages providing capabilities properly
DNF builddep is not consistently installing packages providing capabilities p...
Status: ON_QA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
26
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Jaroslav Mracek
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-04 03:30 EDT by Neal Gompa
Modified: 2017-03-22 11:26 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-10 19:22:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
DNF debugsolver data for the builddep issue (6.54 MB, application/x-xz)
2016-05-17 10:04 EDT, Neal Gompa
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Mageia 18343 None None None 2016-05-22 13:24 EDT

  None (edit)
Description Neal Gompa 2016-05-04 03:30:47 EDT
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.
Comment 1 Honza Silhan 2016-05-09 07:46:59 EDT

*** This bug has been marked as a duplicate of bug 1096506 ***
Comment 2 Neal Gompa 2016-05-17 10:01:56 EDT
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.
Comment 3 Neal Gompa 2016-05-17 10:04 EDT
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
Comment 4 Honza Silhan 2016-05-18 10:42:36 EDT
We should just change reordering of "pkgspec" analysis in bug 1096506 (Subject().get_best_*) then builddep would search by provides at first.
Comment 5 Neal Gompa 2016-05-22 13:24:39 EDT
Updating this ticket to use the new external bug tracker for Mageia bugs.
Comment 6 Fedora Admin XMLRPC Client 2016-07-08 05:26:04 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Jaroslav Mracek 2016-09-12 05:16:03 EDT
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
Comment 8 Jaroslav Mracek 2016-10-04 04:38:39 EDT
There is a new PR: https://github.com/rpm-software-management/dnf/pull/609
Comment 9 Igor Gnatenko 2016-12-02 10:23:34 EST
Neal, can you check if it starts working properly?

If yes -- CLOSED RAWHIDE
If no -- NEW
Comment 10 Neal Gompa 2016-12-10 19:19:48 EST
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?
Comment 11 Neal Gompa 2016-12-10 19:22:30 EST
Wait, nevermind. My bad, it's fine.
Comment 13 Fedora End Of Life 2017-02-28 04:58:01 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.
Comment 14 Fedora Update System 2017-03-21 09:04:20 EDT
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
Comment 15 Fedora Update System 2017-03-22 11:26:38 EDT
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

Note You need to log in before you can comment on or make changes to this bug.