Bug 1446068 - "dnf update --allowerasing" just removes packages instead of update
Summary: "dnf update --allowerasing" just removes packages instead of update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libsolv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Igor Raits
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1484573 1634264 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-27 08:11 UTC by Vít Ondruch
Modified: 2018-12-17 02:27 UTC (History)
10 users (show)

Fixed In Version: libsolv-0.7.1-2.fc29 libsolv-0.7.2-1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-02 08:27:28 UTC
Type: Bug


Attachments (Terms of Use)
debugdata (9.71 MB, application/x-xz)
2017-05-03 13:55 UTC, Vít Ondruch
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openSUSE libsolv issues 290 0 'None' closed update [forcebest] + allowuninstall + disable = erase 2020-10-23 11:48:56 UTC

Description Vít Ondruch 2017-04-27 08:11:08 UTC
Description of problem:
"dnf update --allowerasing" should update the packages, not just remove them. This is hardly justifiable dependency resolution.

Version-Release number of selected component (if applicable):
$ rpm -q dnf
dnf-2.3.0_1-11g53e2ef5.fc27.noarch

$ rpm -q libsolv
libsolv-0.6.26-26g691c2d6.fc27.x86_64


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
# dnf update https://kojipkgs.fedoraproject.org//packages/mock/1.4.1/1.el7/noarch/mock-1.4.1-1.el7.noarch.rpm https://kojipkgs.fedoraproject.org//packages/mock/1.4.1/1.el7/noarch/mock-lvm-1.4.1-1.el7.noarch.rpm --best 
Last metadata expiration check: 2:46:35 ago on Thu Apr 27 07:21:52 2017 CEST.
Error: 
 Problem 1: cannot install the best update candidate for package mock-1.3.4-1.fc26.noarch
  - nothing provides python-ctypes needed by mock-1.4.1-1.el7.noarch
 Problem 2: package mock-lvm-1.4.1-1.el7.noarch requires mock = 1.4.1-1.el7, but none of the providers can be installed
  - cannot install the best update candidate for package mock-lvm-1.3.4-1.fc26.noarch
  - nothing provides python-ctypes needed by mock-1.4.1-1.el7.noarch
(try to add '--allowerasing' to command line to replace conflicting packages)


# dnf update https://kojipkgs.fedoraproject.org//packages/mock/1.4.1/1.el7/noarch/mock-1.4.1-1.el7.noarch.rpm https://kojipkgs.fedoraproject.org//packages/mock/1.4.1/1.el7/noarch/mock-lvm-1.4.1-1.el7.noarch.rpm --best --allowerasing
Last metadata expiration check: 2:47:43 ago on Thu Apr 27 07:21:52 2017 CEST.
Dependencies resolved.
=============================================================================
 Package              Arch    Version         Repository                Size
=============================================================================
Removing:
 fedora-packager      noarch  0.6.0.1-2.fc26  @rawhide                  80 k
 mock                 noarch  1.3.4-1.fc26    @rawhide                 671 k
 mock-lvm             noarch  1.3.4-1.fc26    @rawhide                  45 k
 mock-rpmfusion-free  noarch  26.0-2.fc26     @rpmfusion-free-rawhide   57 k
 rfpkg                noarch  1.25.1-2.fc26   @rpmfusion-free-rawhide   90 k
 rpmfusion-packager   noarch  0.5.3-1.fc26    @rpmfusion-free-rawhide   31 k

Transaction Summary
=============================================================================
Remove  6 Packages

Freed space: 973 k
Is this ok [y/N]: 



Expected results:
The update should probably fail with some resolver error. This is hardly justifiable result, since I am pretty sure I don't want to remove the packages. I just want to update them.


Additional info:

Comment 1 Vít Ondruch 2017-04-27 08:13:51 UTC
Actually now I noticed that I tried to install EPEL7 packages into my Rawhide, that was the reason for the missing dependencies. But still, update should not result in pure "remove" action.

Comment 2 Igor Gnatenko 2017-04-27 08:16:40 UTC
Sounds like bug in libsolv...

Comment 3 Igor Gnatenko 2017-05-03 11:01:56 UTC
Vit, could you run dnf with --debugsolver and attach debugdata directory?

Comment 4 Vít Ondruch 2017-05-03 13:55:59 UTC
Created attachment 1275917 [details]
debugdata

Of course I don't have the original environment in that specific state available anymore, but I tried to recreate with a limited test case.

Comment 5 Jan Kurik 2017-08-15 06:57:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 6 Igor Gnatenko 2017-08-30 06:50:16 UTC
*** Bug 1484573 has been marked as a duplicate of this bug. ***

Comment 7 Jaroslav Mracek 2018-10-01 13:10:27 UTC
*** Bug 1634264 has been marked as a duplicate of this bug. ***

Comment 8 Ben Cotton 2018-11-27 14:13:26 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Jaroslav Mracek 2018-11-27 15:35:28 UTC
The problem is still valid. Please Igor is there any progress on the issue?

Comment 10 Igor Raits 2018-11-28 11:08:57 UTC
I've tried to play with testcase, but all versions of libsolv I've tried report:

Results differ:
-erase fedora-packager-0.6.0.1-2.fc26.noarch@@System
-erase mock-1.3.4-1.fc26.noarch@@System
-erase mock-lvm-1.3.4-1.fc26.noarch@@System

So either it is bug in dnf/libdnf or it is just producing incorrect testcase.

Comment 11 George R. Goffe 2018-11-28 18:26:51 UTC
Igor,

I'm curious as to how you can close this bug with worksforme when there is apparently a bug still in existence?

George...

Comment 12 Igor Raits 2018-11-28 19:13:13 UTC
(In reply to George R. Goffe from comment #11)
> Igor,
> 
> I'm curious as to how you can close this bug with worksforme when there is
> apparently a bug still in existence?
> 
> George...

Do you have reproducer?

Comment 13 Jaroslav Mracek 2018-11-29 14:52:58 UTC
There is an easy reproducer:
Find package that requires versioned dependency like git-2.19.2-1.fc29 that requires git-core-2.19.2-1.fc29.

Then following command will do the job: 
sudo dnf upgrade git -x git-core-2.19.2-1.fc29 --allowerasing --best

Comment 14 Igor Raits 2018-11-29 16:29:45 UTC
Thanks for reproducer.

However, it is interesting:

⋊> ~ sudo dnf update python3-bodhi-client -x python3-bodhi --best --allowerasing --debugsolver --assumeno
Last metadata expiration check: 0:02:55 ago on Thu 29 Nov 2018 05:25:34 PM CET.
Dependencies resolved.
================================================================================
 Package                   Arch        Version              Repository     Size
================================================================================
Removing:
 python3-bodhi-client      noarch      3.11.0-1.fc30        @rawhide      163 k
Removing dependent packages:
 bodhi-client              noarch      3.11.0-1.fc30        @rawhide       24 k
 fedora-packager           noarch      0.6.0.2-3.fc30       @rawhide       79 k
 fedpkg                    noarch      1.35-2.fc30          @rawhide      201 k

Transaction Summary
================================================================================
Remove  4 Packages

Freed space: 467 k
Operation aborted.
⋊> ~ cat debugdata/rpms/solver.result                                   17:29:02
erase bodhi-client-3.11.0-1.fc30.noarch@@System
erase fedora-packager-0.6.0.2-3.fc30.noarch@@System
erase fedpkg-1.35-2.fc30.noarch@@System
erase python3-bodhi-client-3.11.0-1.fc30.noarch@@System
⋊> ~ testsolv debugdata/rpms/testcase.t                                 17:29:10
Results differ:
-erase bodhi-client-3.11.0-1.fc30.noarch@@System
-erase fedora-packager-0.6.0.2-3.fc30.noarch@@System
-erase fedpkg-1.35-2.fc30.noarch@@System
-erase python3-bodhi-client-3.11.0-1.fc30.noarch@@System

---

I'll look at it.

Comment 15 Igor Raits 2018-11-29 16:31:48 UTC
Ok, I can reproduce now with testsolv.

Looking.

Comment 16 Jaroslav Mracek 2018-11-30 08:31:42 UTC
I belive that for proper investigation you need libsolv with https://github.com/openSUSE/libsolv/commit/0302dce36cb5066a5c818d616a047dc93cfd025d.

Comment 17 Fedora Update System 2018-11-30 14:48:55 UTC
libsolv-0.7.1-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-092ca34d90

Comment 18 Fedora Update System 2018-11-30 14:49:02 UTC
libsolv-0.7.1-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-13fa00525c

Comment 19 Fedora Update System 2018-12-01 01:38:14 UTC
libsolv-0.7.1-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-13fa00525c

Comment 20 Fedora Update System 2018-12-01 02:43:12 UTC
libsolv-0.7.1-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-092ca34d90

Comment 21 Fedora Update System 2018-12-02 08:27:28 UTC
libsolv-0.7.1-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2018-12-10 16:09:22 UTC
libsolv-0.7.2-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f07d64c532

Comment 23 Fedora Update System 2018-12-17 02:27:43 UTC
libsolv-0.7.2-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


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