Bug 1242946

Summary: [depsolv] dnf prefers package names over provide names
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, mluscon, msimacek, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.1.1-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-09 23:19:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
debugdata none

Description Lukas Slebodnik 2015-07-14 13:10:20 UTC
Version-Release number of selected component (if applicable):
[root@29163e0f0833 /]# rpm -q dnf dnf-plugins-core python-libipa_hbac
dnf-1.0.1-2.fc22.noarch
dnf-plugins-core-0.1.9-1.fc22.noarch
python-libipa_hbac-1.13.0-1.fc22.x86_64

How reproducible:
deterministic

Steps to Reproduce:
1. curl -O https://kojipkgs.fedoraproject.org//packages/freeipa/4.1.4/4.fc22/src/freeipa-4.1.4-4.fc22.src.rpm
2. dnf --enablerepo=updates-testing install python-libipa_hbac
3. dnf install 'dnf-command(builddep)'
3. dnf --enablerepo=updates-testing builddep freeipa-4.1.4-4.fc22.src.rpm

Actual results:
[root@29163e0f0833 /]# dnf --enablerepo=updates-testing builddep freeipa-4.1.4-4.fc22.src.rpm
Last metadata expiration check performed 0:01:34 ago on Tue Jul 14 13:04:02 2015.
Package python-setuptools-17.1.1-3.fc22.noarch is already installed, skipping.
Package systemd-219-18.fc22.x86_64 is already installed, skipping.
Package systemd-219-18.fc22.x86_64 is already installed, skipping.
Error: installed package python-libipa_hbac-1.13.0-1.fc22.x86_64 obsoletes libipa_hbac-python < 1.13.0 provided by libipa_hbac-python-1.12.4-6.fc22.x86_64

Expected results:
All build dependencies are installed

Additional info:
It works like a charm with yum-deprecated

yum-builddep --enablerepo=updates-testing freeipa-4.1.4-4.fc22.src.rpm

Comment 1 Lukas Slebodnik 2015-07-14 13:12:55 UTC
It is reproducible in minimal fedora 22 container. So I hope you will be able to reproduce as well.

And additional info:

[root@29163e0f0833 /]# rpm -q --provides python-libipa_hbac 
libipa_hbac-python = 1.13.0-1.fc22
python-libipa_hbac = 1.13.0-1.fc22
python-libipa_hbac(x86-64) = 1.13.0-1.fc22

[root@29163e0f0833 /]# rpm -q --obsoletes python-libipa_hbac 
libipa_hbac-python < 1.13.0

Comment 2 Radek Holy 2015-07-15 06:37:06 UTC
Created attachment 1052196 [details]
debugdata

Can you please follow these instructions if you hit some depsolving problems next time: https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#dependency-resolution-problem

I'll take a look.

Comment 3 Radek Holy 2015-07-15 06:44:03 UTC
I think that the reproducer can be reduced to:

# dnf --enablerepo=updates-testing install python-libipa_hbac
# dnf install libipa_hbac-python
Last metadata expiration check performed 0:00:46 ago on Wed Jul 15 08:39:15 2015.
Error: installed package python-libipa_hbac-1.13.0-1.fc22.x86_64 obsoletes libipa_hbac-python < 1.13.0 provided by libipa_hbac-python-1.12.4-6.fc22.x86_64

IIRC, there is a similar bug report already.

Comment 4 Lukas Slebodnik 2015-07-15 06:47:22 UTC
dnf tried to downgrade sssd with following command
dnf --enablerepo=updates-testing --allowerasing  builddep freeipa-4.1.4-4.fc22.src.rpm

I do not want do downgrade package because renamed package has proper provides.

Comment 5 Lukas Slebodnik 2015-07-15 06:57:09 UTC
(In reply to Radek Holy from comment #3)
> I think that the reproducer can be reduced to:
> 
> # dnf --enablerepo=updates-testing install python-libipa_hbac
> # dnf install libipa_hbac-python
> Last metadata expiration check performed 0:00:46 ago on Wed Jul 15 08:39:15
> 2015.
> Error: installed package python-libipa_hbac-1.13.0-1.fc22.x86_64 obsoletes
> libipa_hbac-python < 1.13.0 provided by
> libipa_hbac-python-1.12.4-6.fc22.x86_64
> 
> IIRC, there is a similar bug report already.

It worked for me in minimal container image

[root@8e84435e3396 /]# dnf --enablerepo=updates-testing install python-libipa_hbac
Fedora 22 - x86_64 - Test Updates                35 MB/s | 3.4 MB     00:00    
Last metadata expiration check performed 0:00:00 ago on Wed Jul 15 06:54:32 2015.
Dependencies resolved.
================================================================================
 Package                Arch       Version            Repository           Size
================================================================================
Installing:
 python-libipa_hbac     x86_64     1.13.0-1.fc22      updates-testing      66 k
     replacing  libipa_hbac-python.x86_64 1.12.5-3.fc22
Upgrading:
 libipa_hbac            x86_64     1.13.0-1.fc22      updates-testing      71 k

Transaction Summary
================================================================================
Install  1 Package
Upgrade  1 Package

Total download size: 137 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): python-libipa_hbac-1.13.0-1.fc22.x86_64. 264 kB/s |  66 kB     00:00    
(2/2): libipa_hbac-1.13.0-1.fc22.x86_64.rpm     283 kB/s |  71 kB     00:00    
--------------------------------------------------------------------------------
Total                                            64 kB/s | 137 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Upgrading   : libipa_hbac-1.13.0-1.fc22.x86_64                            1/4 
warning: Unable to get systemd shutdown inhibition lock
  Installing  : python-libipa_hbac-1.13.0-1.fc22.x86_64                     2/4 
  Obsoleting  : libipa_hbac-python-1.12.5-3.fc22.x86_64                     3/4 
  Cleanup     : libipa_hbac-1.12.5-3.fc22.x86_64                            4/4 
  Verifying   : python-libipa_hbac-1.13.0-1.fc22.x86_64                     1/4 
  Verifying   : libipa_hbac-1.13.0-1.fc22.x86_64                            2/4 
  Verifying   : libipa_hbac-1.12.5-3.fc22.x86_64                            3/4 
  Verifying   : libipa_hbac-python-1.12.5-3.fc22.x86_64                     4/4 

Installed:
  python-libipa_hbac.x86_64 1.13.0-1.fc22                                       

Upgraded:
  libipa_hbac.x86_64 1.13.0-1.fc22



[root@8e84435e3396 /]#  rpm -q libsolv hawkey dnf
libsolv-0.6.11-1.fc22.x86_64
hawkey-0.5.7-1.fc22.x86_64
dnf-1.0.1-2.fc22.noarch

But I'm glad you was able to reproduce it yourself.

Comment 6 Honza Silhan 2015-07-29 14:23:26 UTC
We should reorder Subject matching to match provides first, then names and files.

Comment 7 Honza Silhan 2015-08-28 09:29:59 UTC
*** Bug 1223478 has been marked as a duplicate of this bug. ***

Comment 8 Honza Silhan 2015-08-28 09:48:55 UTC
PR: https://github.com/rpm-software-management/dnf/pull/338

Comment 9 Fedora Update System 2015-09-01 09:52:00 UTC
dnf-plugins-core-0.1.11-1.fc23 dnf-1.1.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 10 Fedora Update System 2015-09-01 20:22:37 UTC
dnf-1.1.1-1.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 12 Fedora Update System 2015-09-08 12:38:40 UTC
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744

Comment 13 Fedora Update System 2015-09-08 12:39:01 UTC
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744

Comment 14 Fedora Update System 2015-09-08 12:39:59 UTC
dnf-1.1.1-2.fc23 dnf-plugins-core-0.1.11-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 15 Fedora Update System 2015-09-08 17:51:57 UTC
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 16 Fedora Update System 2015-09-08 21:26:02 UTC
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugins-core dnf'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744

Comment 17 Fedora Update System 2015-09-09 23:18:42 UTC
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-09-23 04:12:22 UTC
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.