Bug 1600444 - Wrong conflicts between dnf and yum prevents upgrade
Summary: Wrong conflicts between dnf and yum prevents upgrade
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
(Show other bugs)
Version: 29
Hardware: Unspecified Unspecified
unspecified
high
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Keywords: Triaged
: 1590044 1632794 (view as bug list)
Depends On:
Blocks: F29BetaFreezeException
TreeView+ depends on / blocked
 
Reported: 2018-07-12 09:29 UTC by Lukas Slebodnik
Modified: 2018-11-22 18:02 UTC (History)
12 users (show)

Fixed In Version: dnf-4.0.4
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-11-22 18:02:27 UTC
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1606775 None None None Never

Description Lukas Slebodnik 2018-07-12 09:29:11 UTC
Description of problem:
I cannot see yum (with binary /usr/bin/yum-deprecated) retired in fedora
https://src.fedoraproject.org/rpms/yum/

Therefore it should be possible to upgrade packages without any problem
(without any conflicts) or some package should be obsoleted/replaced by other package.

BTW There are also two packages which own the same file and are not build from the same src.rpm (IIRC it is against fedora packaging guidelines)


Version-Release number of selected component (if applicable):
sh$ rpm -q yum dnf dnf-yum
yum-3.4.3-517.fc28.noarch
dnf-2.7.5-12.fc28.noarch
dnf-yum-2.7.5-12.fc28.noarch

How reproducible:
Deterministic

Steps to Reproduce:
//run command in minimal f28 container for simpler reproducer
docker run -ti --rm fedora:28 bash
1. dnf install -y yum fedora-repos-rawhide
2. rm -rf /var/cache/dnf/*
3. dnf --disablerepo=* --enablerepo=rawhide update dnf

Actual results:
[root@224d9f322bfd /]# dnf --disablerepo=* --enablerepo=rawhide update dnf
Last metadata expiration check: 0:07:34 ago on Thu Jul 12 08:47:33 2018.
Dependencies resolved.

 Problem: problem with installed package yum-3.4.3-517.fc28.noarch
  - package dnf-yum-3.0.2-1.fc29.noarch conflicts with yum provided by yum-3.4.3-517.fc28.noarch
  - package dnf-yum-3.0.2-1.fc29.noarch conflicts with yum provided by yum-3.4.3-518.fc29.noarch
  - problem with installed package dnf-yum-2.7.5-12.fc28.noarch
  - package dnf-yum-2.7.5-12.fc28.noarch requires dnf = 2.7.5-12.fc28, but none of the providers can be installed
  - cannot install both dnf-3.0.2-1.fc29.noarch and dnf-2.7.5-12.fc28.noarch
  - cannot install the best update candidate for package dnf-2.7.5-12.fc28.noarch
================================================================================
 Package         Arch           Version                   Repository       Size
================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 dnf             noarch         3.0.2-1.fc29              rawhide         351 k
 dnf-yum         noarch         3.0.2-1.fc29              rawhide          59 k
 yum             noarch         3.4.3-518.fc29            rawhide         1.2 M

Transaction Summary
================================================================================
Skip  3 Packages

Nothing to do.
Complete!

Expected results:
There is not any issue in upgrade.

Additional info:

Here is output with --best
[root@224d9f322bfd /]# dnf --disablerepo=* --enablerepo=rawhide update dnf --best
Last metadata expiration check: 0:08:50 ago on Thu Jul 12 08:47:33 2018.
Error: 
 Problem: problem with installed package yum-3.4.3-517.fc28.noarch
  - package dnf-yum-3.0.2-1.fc29.noarch conflicts with yum provided by yum-3.4.3-517.fc28.noarch
  - package dnf-yum-3.0.2-1.fc29.noarch conflicts with yum provided by yum-3.4.3-518.fc29.noarch
  - problem with installed package dnf-yum-2.7.5-12.fc28.noarch
  - package dnf-yum-2.7.5-12.fc28.noarch requires dnf = 2.7.5-12.fc28, but none of the providers can be installed
  - cannot install both dnf-3.0.2-1.fc29.noarch and dnf-2.7.5-12.fc28.noarch
  - cannot install the best update candidate for package dnf-2.7.5-12.fc28.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)


And repoquery for yum.conf
[root@224d9f322bfd /]# dnf --disablerepo=* --enablerepo=rawhide repoquery --whatprovides /etc/yum.conf
Last metadata expiration check: 0:09:30 ago on Thu Jul 12 08:47:33 2018.
dnf-yum-0:3.0.2-1.fc29.noarch
yum-0:3.4.3-518.fc29.noarch

Comment 1 Daniel Mach 2018-07-16 11:34:04 UTC
Can you provide the --allowerasing option as suggested by DNF?

Comment 2 Lukas Slebodnik 2018-07-16 12:03:19 UTC
(In reply to Daniel Mach from comment #1)
> Can you provide the --allowerasing option as suggested by DNF?

No, I do not want to add --allowerasing to automatic updates
You never know which *important* package will will be automatically removed due to this options.

If you to replace the package yum(/usr/bin/yum-deprecated) then you should either use Conflict+Obsoletes[1] in dnf or do that via package fedora-obsolete-packages + retire yum package in rawhide.

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

Comment 3 Jan Kurik 2018-08-14 10:29:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 4 Zbigniew Jędrzejewski-Szmek 2018-08-28 19:26:12 UTC
*** Bug 1590044 has been marked as a duplicate of this bug. ***

Comment 5 Zbigniew Jędrzejewski-Szmek 2018-08-28 19:37:10 UTC
The conflict was introduced in dnf-2.7.15-13, vide https://src.fedoraproject.org/rpms/dnf/c/8d1c31a72daad1689ebbed9e4983943432eb9822?branch=master.
- Conflicts:      yum < 3.4.3-505
+ Conflicts:      yum

This obviously breaks upgrades from previous Fedora releases. Unversioned Obsoletes should not be used [see https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/BK4XGI5XAENKLDZUYJTAOHXJGXLI4ZRA/].

What Lukas writes in comment #c2 is correct — this is something that needs to be fixed in dnf-yum.

Comment 6 Adam Williamson 2018-09-07 18:29:43 UTC
openQA also runs into this. Proposing as an FE, anything that breaks upgrades without --allowerasing is worth considering as an FE (since upgrades run without u-t enabled in most cases).

Comment 7 Adam Williamson 2018-09-07 18:31:17 UTC
BTW, +1 to Lukas: "just use --allowerasing" is not the correct solution. It's very dangerous to recommend it in case people happen to be in a case where there are *two or more* problems in their package set, where --allowerasing would correctly 'solve' one but would wipe out half their system in the other case.

This is why I'm not too happy that gnome-software does --allowerasing by default (effectively).

Comment 8 Adam Williamson 2018-09-10 22:43:41 UTC
Discussed at 2018-09-10 freeze exception review meeting: https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2018-09-10/f29-blocker-review.2018-09-10-16.01.html . Accepted as a freeze exception issue as this can prevent upgrades working without the potentially-dangerous --allowerasing , and upgrades typically run without updates-testing so there is a benefit to pushing this stable for folks trying to upgrade at present.

Comment 10 Adam Williamson 2018-09-17 15:37:10 UTC
Well, now it's still broken for people moving to Rawhide...

what is it you actually want to happen? yum to be removed on upgrade? Then you'd want an Obsoletes, not a Conflicts...

Comment 11 Adam Williamson 2018-09-27 09:09:50 UTC
*** Bug 1632794 has been marked as a duplicate of this bug. ***

Comment 12 Adam Williamson 2018-09-27 09:13:05 UTC
dnf-3.6.1-1.fc29 fixes this (for f29), but has not yet been submitted as an update (as we're figuring out what all else needs to be changed alongside it).


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