Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1600444 - Wrong conflicts between dnf and yum prevents upgrade
Summary: Wrong conflicts between dnf and yum prevents upgrade
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
: 1590044 1632794 1684095 (view as bug list)
Depends On:
Blocks: F30BetaFreezeException
TreeView+ depends on / blocked
 
Reported: 2018-07-12 09:29 UTC by Lukas Slebodnik
Modified: 2020-01-31 07:33 UTC (History)
17 users (show)

Fixed In Version: dnf-4.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-05 08:42:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1606775 0 unspecified CLOSED yum: FTBFS in Fedora rawhide 2021-02-22 00:41:40 UTC

Internal Links: 1606775

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).

Comment 13 Dominik 'Rathann' Mierzejewski 2019-02-28 12:05:21 UTC
Broken for F29->F30 upgrades:
package dnf-yum-4.1.0-1.fc30.noarch conflicts with yum provided by yum-3.4.3-521.fc30.noarch

See bug 1684095 .

Comment 14 Adam Williamson 2019-02-28 15:41:00 UTC
Just as I predicted in comment #10:

"Well, now it's still broken for people moving to Rawhide..."

The 'fix' for this was simply to wrap it in a `%if 0%{?fedora} >= 30` conditional. So it's not surprising we're now getting exactly the same problem on upgrades to 30.

DNF folks, can you actually decide what it is you're trying to achieve here, and achieve it properly? Thanks.

Comment 15 Adam Williamson 2019-02-28 15:42:04 UTC
*** Bug 1684095 has been marked as a duplicate of this bug. ***

Comment 16 Marcin Zajaczkowski 2019-03-02 21:21:31 UTC
It's even broken for simple `sudo dnf update` in Fedora 29 when `mock` is updated having yum-utils installed in the past.

```
$ sudo dnf update mock                                                                                                                                                                                                           Last metadata expiration check: 0:12:27 ago on 2019-03-02T22:05:05 CET.
Dependencies resolved.
===================================================================================================================================
 Package                        Architecture                Version                             Repository                    Size
===================================================================================================================================
Upgrading:
 mock                           noarch                      1.4.14-1.fc29                       updates                      170 k
Installing weak dependencies:
 dnf-utils                      noarch                      4.0.4-1.fc29                        updates                       35 k

Transaction Summary
===================================================================================================================================
Install  1 Package
Upgrade  1 Package

Total size: 205 k
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] dnf-utils-4.0.4-1.fc29.noarch.rpm: Already downloaded                                                                                                                                                                              
[SKIPPED] mock-1.4.14-1.fc29.noarch.rpm: Already downloaded                                                                                                                                                                                  
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/bin/debuginfo-install from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/find-repos-of-install from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/needs-restarting from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/package-cleanup from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
(...)
  file /usr/share/man/man1/yumdownloader.1.gz from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch

Error Summary
-------------
```

If you think it should be separately reported to the mock component please let me know.

Comment 17 Marcin Zajaczkowski 2019-03-02 21:22:48 UTC
Of course removing yum-utils prior to that update solves the problem, but it would be better to have it done automatically.

Comment 18 Geoffrey Marr 2019-03-04 18:33:16 UTC
Discussed during the 2019-03-04 blocker review meeting: [1]

The decision to classify this bug as an "AcceptedFreezeException" was made as this interferes with upgrades in a common case. Granting an FE allows a fix to go to F30 stable during freeze, so upgrades run without updates-testing enabled (the usual case) during freeze period will not hit the bug.

[1] https://meetbot.fedoraproject.org/fedora-blocker-review/2019-03-04/f30-blocker-review.2019-03-04-17.03.txt

Comment 19 phillD 2019-03-09 10:52:23 UTC
hi don't think this exactly the right place to be ,but it beautifully covers my problem
the error summary shown by Marcin is the same problem i have had for more than i would like

sudo dnf update
produces a 

Transaction Summary
=============================================================================================================================================================================
Install    9 Packages
Upgrade  249 Packages
Remove     6 Packages

Total size: 463 M
Total download size: 413 k
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] dnf-utils-4.0.4-1.fc29.noarch.rpm: Already downloaded                                                                                                             
[SKIPPED] kernel-4.20.13-200.fc29.x86_64.rpm: Already downloaded                                                                                                            
[SKIPPED] kernel-core-4.20.13-200.fc29.x86_64.rpm: Already downloaded                                                                                                       
[SKIPPED] kernel-devel-4.20.13-200.fc29.x86_64.rpm: Already downloaded 
etc...to

[SKIPPED] google-chrome-stable-72.0.3626.121-1.x86_64.rpm: Already downloaded                                                                                               
(253/258): libxcrypt-4.4.3-10.fc29_4.4.4-1.fc29.i686.drpm                                                                                     16 kB/s |  23 kB     00:01    
(254/258): libxcrypt-devel-4.4.3-10.fc29_4.4.4-1.fc29.x86_64.drpm                                                                             12 kB/s |  19 kB     00:01    
[DRPM 1/4] libxcrypt-4.4.3-10.fc29_4.4.4-1.fc29.i686.drpm: done                                                                                                             
(255/258): libxcrypt-4.4.3-10.fc29_4.4.4-1.fc29.x86_64.drpm                                                                                   15 kB/s |  24 kB     00:01    
(256/258): libxcrypt-static-4.4.3-10.fc29_4.4.4-1.fc29.x86_64.drpm                                                                            81 kB/s |  19 kB     00:00    
[DRPM 2/4] libxcrypt-devel-4.4.3-10.fc29_4.4.4-1.fc29.x86_64.drpm: done                                                                                                     
[DRPM 3/4] libxcrypt-4.4.3-10.fc29_4.4.4-1.fc29.x86_64.drpm: done                                                                                                           
(257/258): kmodtool-1-33.fc29.noarch.rpm                                                                                                      78 kB/s |  13 kB     00:00    
(258/258): akmods-0.5.6-19.fc29.noarch.rpm                                                                                                    93 kB/s |  23 kB     00:00    
[DRPM 4/4] libxcrypt-static-4.4.3-10.fc29_4.4.4-1.fc29.x86_64.drpm: done                                                                                                    
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                         28 kB/s | 122 kB     00:04     
Delta RPMs reduced 462.8 MB of updates to 462.5 MB (0.1% saved)
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/bin/debuginfo-install from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/find-repos-of-install from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/needs-restarting from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/package-cleanup from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/repo-graph from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
  file /usr/bin/repoclosure from install of dnf-utils-4.0.4-1.fc29.noarch conflicts with file from package yum-utils-1.1.31-518.fc29.noarch
etc....
my Question is whereabouts do I find a simple and secure solution to my update problem?

this system was bequeathed by my brother whom was a long-time  linux maintainer, (alland was one of his aliases) but i am but a longterm novice but keen to keep it running and maintained.
Phil Duncan
Lapoinya 
Tasmania

duncanapa.au

Comment 20 Marcin Zajaczkowski 2019-03-09 12:08:04 UTC
@Phill I'm not sure what answer do you expect to get. However, to just solve your issue on that particular system it should be enough to first remove yum-utils (which files conflict with new to-be-installed weak dependency dnf-utils):
> sudo dnf remove yum-utils

and then retry the update:
> sudo dnf update

Comment 21 phillD 2019-03-09 22:50:16 UTC
thanks 

i was not sure of what answer i would get 
but the one i received was perfect

do you know of a forum that would be a suitable level for me to join
as i am don't wish to clog up bugzilla with basic problems
although i would like to be able to contribute as much as i am able .ie system crash report

Comment 22 Marcin Zajaczkowski 2019-03-09 23:14:10 UTC
@Phill, depending on your preferences you may use one of the official channels of communication:
 - forum - https://discussion.fedoraproject.org/
 - mailing list - https://lists.fedoraproject.org/admin/lists/users.lists.fedoraproject.org/
 - SO like site - https://ask.fedoraproject.org/
 - IRC - #fedora at freenode :)

Or alternatively an unofficial forum: https://forums.fedoraforum.org/

In general, I propose you to read the corresponding page on the project wiki to see the big picture :)
https://fedoraproject.org/wiki/Communicating_and_getting_help

Comment 23 phillD 2019-03-10 12:30:36 UTC
thanks

Comment 24 Adam Williamson 2019-03-14 16:41:43 UTC
Should https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc be marked as fixing this? It is mentioned in the dnf changelog.

Comment 25 Jaroslav Mracek 2019-08-05 08:42:07 UTC
Thanks a lot, the issue was already fixed in dnf-4.2.5.

Comment 26 Marek Blaha 2020-01-31 07:33:58 UTC
clearing stale needinfo


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