Bug 1332830 - DNF builddep is not consistently installing packages providing capabilities properly
Summary: DNF builddep is not consistently installing packages providing capabilities p...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: 26
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-04 07:30 UTC by Neal Gompa
Modified: 2017-04-01 17:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-01 17:22:41 UTC
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 14:04 UTC, Neal Gompa
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Mageia 18343 None None None 2016-05-22 17:24 UTC
Red Hat Bugzilla 1096506 None CLOSED promoting 'install a' to 'install b' when b obsoletes a 2019-01-29 22:35 UTC

Internal Trackers: 1096506

Description Neal Gompa 2016-05-04 07:30:47 UTC
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 11:46:59 UTC

*** This bug has been marked as a duplicate of bug 1096506 ***

Comment 2 Neal Gompa 2016-05-17 14:01:56 UTC
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 14:04 UTC
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 14:42:36 UTC
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 17:24:39 UTC
Updating this ticket to use the new external bug tracker for Mageia bugs.

Comment 6 Fedora Admin XMLRPC Client 2016-07-08 09:26:04 UTC
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 09:16:03 UTC
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 08:38:39 UTC
There is a new PR: https://github.com/rpm-software-management/dnf/pull/609

Comment 9 Igor Gnatenko 2016-12-02 15:23:34 UTC
Neal, can you check if it starts working properly?

If yes -- CLOSED RAWHIDE
If no -- NEW

Comment 10 Neal Gompa 2016-12-11 00:19:48 UTC
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-11 00:22:30 UTC
Wait, nevermind. My bad, it's fine.

Comment 13 Fedora End Of Life 2017-02-28 09:58:01 UTC
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 13:04:20 UTC
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 15:26:38 UTC
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

Comment 16 Fedora Update System 2017-04-01 17:22:41 UTC
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.


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