Bug 1519325 - dnf fails to install a package by a "provides" name
Summary: dnf fails to install a package by a "provides" name
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-30 15:29 UTC by Omair Majid
Modified: 2018-06-28 08:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 08:27:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Omair Majid 2017-11-30 15:29:42 UTC
Description of problem:

I created a package called `dotnet-sdk-2.0`. It includes a `Provides: dotnet`. dnf fails to install it when I ask to install it by the provided name, `dotnet`.

Version-Release number of selected component (if applicable):
dnf-2.7.5-1.fc27.noarch

How reproducible:
100%

Steps to Reproduce:
1. dnf copr enable @dotnet-sig/dotnet
2. dnf install dotnet

Here is what I see on my machine:

$ sudo dnf clean all
37 files removed             
[omajid@trull ~]$ sudo dnf repolist                        
Copr repo for dotnet owned by @dotnet-sig                                              23 kB/s |  40 kB     00:01     
Fedora 27 - x86_64 - Updates                                                          3.6 MB/s |  11 MB     00:02     
Fedora 27 - x86_64                                                                    8.2 MB/s |  58 MB     00:07     
RPM Fusion for Fedora 27 - Free - Updates                                             139 kB/s |  66 kB     00:00     
RPM Fusion for Fedora 27 - Free                                                       998 kB/s | 717 kB     00:00    
Last metadata expiration check: 0:00:00 ago on Thu 30 Nov 2017 10:23:44 AM EST.
repo id                                        repo name                                                        status
*fedora                                        Fedora 27 - x86_64                                               54,801
group_dotnet-sig-dotnet                        Copr repo for dotnet owned by @dotnet-sig                            17
*rpmfusion-free                                RPM Fusion for Fedora 27 - Free                                     574
*rpmfusion-free-updates                        RPM Fusion for Fedora 27 - Free - Updates                            55
*updates                                       Fedora 27 - x86_64 - Updates                                      6,162
$ sudo dnf repoquery --provides dotnet-sdk-2.0
Last metadata expiration check: 0:00:12 ago on Thu 30 Nov 2017 10:23:44 AM EST.
dotnet = 2.0.3-3.fc27
dotnet-sdk-2.0 = 2.0.3-2.fc27
dotnet-sdk-2.0 = 2.0.3-3.fc27
dotnet-sdk-2.0(x86-64) = 2.0.3-2.fc27
dotnet-sdk-2.0(x86-64) = 2.0.3-3.fc27
$ sudo dnf install dotnet
Last metadata expiration check: 0:00:21 ago on Thu 30 Nov 2017 10:23:44 AM EST.
  * Maybe you meant: dotnet
No match for argument: dotnet
Error: Unable to find a match
$ sudo dnf install dotnet-2.0.3-3.fc27
Last metadata expiration check: 0:00:27 ago on Thu 30 Nov 2017 10:23:44 AM EST.
  * Maybe you meant: dotnet
No match for argument: dotnet-2.0.3-3.fc27
Error: Unable to find a match

Strangely, for other packages, I can install by provides:

$ sudo dnf install java-devel
Last metadata expiration check: 0:00:38 ago on Thu 30 Nov 2017 10:23:44 AM EST.
Package java-1.8.0-openjdk-devel-1:1.8.0.151-1.b12.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

Comment 1 Omair Majid 2017-11-30 15:39:09 UTC
If this is PEBKAC, could you please at least fix the confusing messages that I see here:

"""
  * Maybe you meant: dotnet
No match for argument: dotnet
"""

Comment 2 Jaroslav Mracek 2017-12-01 07:28:48 UTC
The problem here is that you have dotnet.src package in repository. DNF first search for solution by name, it found one, but src package is not install-able therefore it writes no match for argument.

Comment 3 Jaroslav Mracek 2017-12-01 07:42:02 UTC
I created a patch that should solve the issue with hint (https://github.com/rpm-software-management/dnf/pull/993). In future we will enhance reports, but cannot now.

Comment 4 Omair Majid 2017-12-01 15:39:44 UTC
Thanks for the quick response.

Am I understanding it correctly that a package shouldn't have a `Provide:` matching the base backage name, then? And dnf will not install the package that `Provides: dotnet` as long as dotnet.src exists?

Comment 5 Jaroslav Mracek 2017-12-11 18:10:06 UTC
Normally your problem cannot happen because src packages are placed in separate disabled repository. I would suggest that you can workaround it by: "dnf install dotnet -x dotnet.src" or change name of package "dotnet-sdk" to "dotnet". Or try to install directly "dotnet-sdk", or add "excludepkgs=dotnet" to "/etc/yum.repos.d/<repo_name>.repo" . There are many possibilities how to solve your problem.

Comment 6 Jaroslav Mracek 2018-06-28 08:27:50 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.


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