Bug 1460424 - dnf ignoring obsoletes version bound?
Summary: dnf ignoring obsoletes version bound?
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 26
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-06-10 09:48 UTC by Jens Petersen
Modified: 2017-07-27 15:21 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-27 15:21:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
debugdata.tar (8.43 MB, application/x-tar)
2017-06-22 02:22 UTC, Jens Petersen
no flags Details

Description Jens Petersen 2017-06-10 09:48:59 UTC
Description of problem:
git-annex no longer builds for F26+.
ghc-obsoletes currently obsoletes the older git-annex version which no longer builds.
I have a copr repo with a newer version of git-annex.
DNF seems unable to install git-annex even though the version is newer than the obsoletes.

Is this an known issue or expected behaviour?

How reproducible:
100%

Steps to Reproduce:
1. dnf install git-annex
2. dnf copr enable petersen/git-annex

Actual results:
1. tries to install ghc-obsoletes
2. tries to install ghc-obsoletes even though version is newer than obsoletes

Expected results:
2. install git-annex from copr

Additional info:
A workaround is to install "git-annex-<VERSION>".

Comment 1 Igor Gnatenko 2017-06-14 11:28:40 UTC
Please, run it with --debugsolver and attach debugdata directory.. This will help me to understand what's going on.

Comment 2 Jens Petersen 2017-06-22 02:22:00 UTC
Created attachment 1290422 [details]
debugdata.tar

Sorry for the delay, here you go.

Comment 3 Igor Gnatenko 2017-07-01 17:37:51 UTC
Looks like there is a bug in libsolv's `oneof` implementation, but that's not really critical since primary bug is in libdnf/dnf:

job install oneof ghc-obsoletes-1.6.19-2.fc26.x86_64@@System git-annex-6.20170519-1.fc26.x86_64@petersen-git-annex ghc-obsoletes-1.6.19-2.fc26.x86_64@updates-testing ghc-obsoletes-1.6.19-2.fc26.x86_64@fedora git-annex-5.20140717-13.fc26.x86_64@fedora [setevr,setarch]

Basically, dnf doesn't handle those obsoletes properly.

Jaroslav is the best person to deal with this problem.

Comment 4 Igor Gnatenko 2017-07-17 14:10:42 UTC
> Jaroslav Mracek 2017-07-17 16:07:41 CEST
> Keywords: Triaged
> Assignee: jmracek → rpm-software-management.org

Please, explain.

Comment 5 Jaroslav Mracek 2017-07-27 15:21:21 UTC
Just to explain the logic here. If you use only name of packages, dns suggests that you want to install on of following possibilities:
1 Packages with that package name
2. Packages that obsoletes the packages from first point.

If you add additional information like version, arch ... it only installs what was requested without obsoletes. 

In your case ghc-obsoletes obsoletes git-annex-5.20140717-13.fc26.x86_64@fedora, therefore solver is satisfied with installed ghc-obsoletes (this is correct behavior). It is true that there is one additional package git-annex-6.20170519-1.fc26.x86_64@petersen-git-annex that is not obsoleted, but it is difficult in such complicate case to exactly guess, what exactly user prefer. I believe that if there will be no ghc-obsoletes on your system, the primary option for solver would be latest git-annex.

I don't think, that we can change the behavior, because obsoletes are often use to remove unsupported packages from the system, and I see that this workaround is not nice at all. If we will not add obsoletes into install transaction, there will be users but mostly devels and maintainers that start to scream about.

I am really sorry, but there is no other option.


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