Bug 1242946 - [depsolv] dnf prefers package names over provide names
[depsolv] dnf prefers package names over provide names
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
: 1223478 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-14 09:10 EDT by Lukas Slebodnik
Modified: 2015-09-23 00:13 EDT (History)
8 users (show)

See Also:
Fixed In Version: 1.1.1-2.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-09 19:19:09 EDT
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)
debugdata (5.26 MB, application/x-xz)
2015-07-15 02:37 EDT, Radek Holy
no flags Details

  None (edit)
Description Lukas Slebodnik 2015-07-14 09:10:20 EDT
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 09:12:55 EDT
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 02:37:06 EDT
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 02:44:03 EDT
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 02:47:22 EDT
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 02:57:09 EDT
(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 10:23:26 EDT
We should reorder Subject matching to match provides first, then names and files.
Comment 7 Honza Silhan 2015-08-28 05:29:59 EDT
*** Bug 1223478 has been marked as a duplicate of this bug. ***
Comment 8 Honza Silhan 2015-08-28 05:48:55 EDT
PR: https://github.com/rpm-software-management/dnf/pull/338
Comment 9 Fedora Update System 2015-09-01 05:52:00 EDT
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 16:22:37 EDT
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 08:38:40 EDT
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 08:39:01 EDT
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 08:39:59 EDT
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 13:51:57 EDT
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 17:26:02 EDT
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 19:18:42 EDT
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 00:12:22 EDT
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.

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