Bug 1291850 - [depsolv] Provides are not respected in renamed package
Summary: [depsolv] Provides are not respected in renamed package
Keywords:
Status: CLOSED DUPLICATE of bug 1096506
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-15 17:33 UTC by Lukas Slebodnik
Modified: 2016-01-19 09:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-13 18:21:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dependency solver debug data (5.45 MB, application/x-xz)
2015-12-15 17:35 UTC, Lukas Slebodnik
no flags Details

Description Lukas Slebodnik 2015-12-15 17:33:38 UTC
Description of problem:
The package freeipa-tests was renamed in freeipa 4.3.0 to
python2-ipatests. But package contains correct provides.
However dnf cannot install this pacakge.

Version-Release number of selected component (if applicable):
[root@37a76376b966 /]# rpm -q libsolv hawkey dnf
libsolv-0.6.14-7.fc23.x86_64
hawkey-0.6.2-3.fc23.x86_64
dnf-1.1.4-2.fc23.noarch

How reproducible:
Deterministic


Steps to Reproduce:
1. dnf install 'dnf-command(copr)' && dnf copr enable  pvoborni/freeipa-4-3
2. dnf install -y --best freeipa-server
3. dnf install --best freeipa-tests 


Actual results:
Last metadata expiration check performed 0:02:21 ago on Tue Dec 15 17:22:51 2015.
Error: package freeipa-tests-4.2.3-1.1.fc23.x86_64 requires freeipa-client = 4.2.3-1.1.fc23, but none of the providers can be installed.
package freeipa-tests-4.2.2-1.fc23.x86_64 requires freeipa-python = 4.2.2-1.fc23, but none of the providers can be installed
(try to add '--allowerasing' to command line to replace conflicting packages)




Expected results:
The renamed package python2-ipatests should be installed. 

Additional info:
It works with yum-deprecated or with using renamed name

dnf install python2-ipatests
or
yum-deprecated install freeipa-tests

Comment 1 Lukas Slebodnik 2015-12-15 17:35:36 UTC
Created attachment 1106113 [details]
dependency solver debug data

Comment 2 Honza Silhan 2016-01-04 14:29:07 UTC
When you select package for installation, DNF searches that package by name at first, then by provide, file, etc. [1]. How would the user install the original `freeipa-tests` package then?

[1] http://dnf.readthedocs.org/en/latest/command_ref.html#specifying-packages

Comment 3 Lukas Slebodnik 2016-01-04 15:40:49 UTC
As I mentioned in bug description, it works with yum-deprecated.
So it's a bug in dnf.

I'm not sure why it works with yum-deprecated, maybe provides have higher priority than searching by name (I don't know)

I would accept if it does not work with "dnf install -y freeipa-server"
but it should work with "dnf install -y --best freeipa-server"

Comment 4 Honza Silhan 2016-01-11 12:11:49 UTC
That's a feature of DNF, see comment 2.

(In reply to Lukas Slebodnik from comment #3)
> As I mentioned in bug description, it works with yum-deprecated.
> So it's a bug in dnf.

I would call it feature of DNF.

> I'm not sure why it works with yum-deprecated, maybe provides have higher
> priority than searching by name (I don't know)

yes and this is IMO wrong, see comment 2. You are not able to install any package with package manager, i.e. freeipa-server pkg with yum.

Comment 5 Lukas Slebodnik 2016-01-12 16:53:55 UTC
(In reply to Jan Silhan from comment #4)
> That's a feature of DNF, see comment 2.
>
I can see just a descrition of current state and not explanation why it is not a bug.

(In reply to Jan Silhan from comment #2)
> When you select package for installation, DNF searches that package by name
> at first, then by provide, file, etc. [1]. How would the user install the
> original `freeipa-tests` package then?
> 
If the user would like to install older package(before renaming) then he can still explicitly use "nevr" + "--allowerasing" to downgrade pacakges.
(As the output of dns says. @see bug description -> Actual results.
e.g.
[root@163512410df4 /]# dnf install --allowerasing freeipa-tests-4.2.3-1.1.fc23.x86_64
Last metadata expiration check performed 0:06:23 ago on Tue Jan 12 16:16:19 2016.
Dependencies resolved.
================================================================================
 Package                   Arch   Version           Repository             Size
================================================================================
Installing:
 PyYAML                    x86_64 3.11-11.fc23      updates               168 k
 freeipa-python            x86_64 4.2.3-1.1.fc23    updates               1.4 M
 freeipa-tests             x86_64 4.2.3-1.1.fc23    updates               751 k
//snip

Upgrading:
 libsss_nss_idmap          x86_64 1.13.3-1.fc23     updates                77 k
Removing:
 freeipa-common            noarch 4.3.0-3.fc23      @pvoborni-freeipa-4-3 1.3 M
 python2-ipaclient         noarch 4.3.0-3.fc23      @pvoborni-freeipa-4-3 134 k
 python2-ipalib            x86_64 4.3.0-3.fc23      @pvoborni-freeipa-4-3 6.1 M
 python2-ipaserver         noarch 4.3.0-3.fc23      @pvoborni-freeipa-4-3 2.7 M
Downgrading:
 freeipa-admintools        x86_64 4.2.3-1.1.fc23    updates                56 k
 freeipa-client            x86_64 4.2.3-1.1.fc23    updates               193 k
 freeipa-server            x86_64 4.2.3-1.1.fc23    updates               1.3 M


 
> (In reply to Lukas Slebodnik from comment #3)
> > As I mentioned in bug description, it works with yum-deprecated.
> > So it's a bug in dnf.
> 
> I would call it feature of DNF.
>
It's not a feature it's a bug because dnf cannot find the best solution.
Here is a solution of dnf with downgrade (--alowerasing)
Transaction Summary
================================================================================
Install    21 Packages
Upgrade     1 Package
Remove      4 Packages
Downgrade   3 Packages

and here is a solution from yum-deprecated
Transaction Summary
================================================================================
Install  1 Package (+14 Dependent packages)

The second one is much simpler and right solution.

 
> > I'm not sure why it works with yum-deprecated, maybe provides have higher
> > priority than searching by name (I don't know)
> 
> yes and this is IMO wrong, see comment 2. You are not able to install any
> package with package manager, i.e. freeipa-server pkg with yum.
I do not understand last sentence. 

Here is a small recapitulation.
The package latest freeipa-server is already installed on system. There are two versions of freeipa available in repositories. (4.2 in the first repository and 4.3 in the second repository).

And now I want to install latest version of package with tests. The package was freeipa-tests was renamed and contain "provides + obsoletes" as it is described in fedora packaging guidelines[1]. There is not a way to install latest package with old name. Even explicit provide + evr does not work

[root@163512410df4 /]# rpm -qp --provides python2-ipatests-4.3.0-3.fc23.noarch.rpm 
freeipa-tests(x86-64) = 4.3.0-3.fc23
ipa-tests(x86-64) = 4.3.0
python-ipatests = 4.3.0-3.fc23
python2-ipatests = 4.3.0-3.fc23
[root@163512410df4 /]# rpm -qp --obsoletes python2-ipatests-4.3.0-3.fc23.noarch.rpm 
freeipa-tests < 4.2.91
ipa-tests < 4.3.0
python-ipatests < 4.3.0-3.fc23

[root@163512410df4 /]# dnf install freeipa-tests-4.3.0-3.fc23.x86_64
Last metadata expiration check performed 0:24:23 ago on Tue Jan 12 16:16:19 2016.
No package freeipa-tests-4.3.0-3.fc23.x86_64 available.
Error: Unable to find a match.

The yum-deprecated print following output:
yum-deprecated install -y bind bind-dyndb-ldap freeipa-tests freeipa-server'
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Package freeipa-tests is obsoleted by python2-ipatests, trying to install python2-ipatests-4.3.90.201601111933GIT7cd99e8-0.fc23.noarch instead


Could you explain one more time why it is not a bug if there's no way how to install latest package?

Could you provide better workaround than using yum-deprecated?

I would also appreciate constructive discussion and not just keep closing ticket without reasonable explanation. I looks like "Provides/Obsoletes" are useless and should not be properly handled by dnf or does it mean that it soudl be removed from rpm specification? 

[1] http://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages

Comment 6 Honza Silhan 2016-01-13 18:21:33 UTC
This is actually duplicate.

See the arguments in that bug report + logic explained in install command example: "DNF will automatically recognize that vim is not a package name, but provide, and install a package that provides vim with all required dependencies. Note: Package name match has precedence over package provides match." [1]

Maybe we can print a hint that the package is already obsoleted by which package.

[1] http://dnf.readthedocs.org/en/latest/command_ref.html#install-examples

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

Comment 7 Lukas Slebodnik 2016-01-13 18:49:54 UTC
(In reply to Jan Silhan from comment #6)
> This is actually duplicate.
> 
> See the arguments in that bug report + logic explained in install command
> example: "DNF will automatically recognize that vim is not a package name,
> but provide, and install a package that provides vim with all required
> dependencies. Note: Package name match has precedence over package provides
> match." [1]
> 
> Maybe we can print a hint that the package is already obsoleted by which
> package.
If it is possible I will appreciate it. It's still better than current situation.

Do you need a new ticket?

> 
> [1] http://dnf.readthedocs.org/en/latest/command_ref.html#install-examples
> 
> *** This bug has been marked as a duplicate of bug 1096506 ***

Comment 8 Honza Silhan 2016-01-19 09:13:24 UTC
(In reply to Lukas Slebodnik from comment #7)
> Do you need a new ticket?

that's not needed (bug 1096506) represents that.


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