Red Hat Bugzilla – Bug 1460424
dnf ignoring obsoletes version bound?
Last modified: 2017-07-27 11:21:21 EDT
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?
Steps to Reproduce:
1. dnf install git-annex
2. dnf copr enable petersen/git-annex
1. tries to install ghc-obsoletes
2. tries to install ghc-obsoletes even though version is newer than obsoletes
2. install git-annex from copr
A workaround is to install "git-annex-<VERSION>".
Please, run it with --debugsolver and attach debugdata directory.. This will help me to understand what's going on.
Created attachment 1290422 [details]
Sorry for the delay, here you go.
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.
> Jaroslav Mracek 2017-07-17 16:07:41 CEST
> Keywords: Triaged
> Assignee: email@example.com → firstname.lastname@example.org
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.