Bug 1160011 - removal in install transaction
Summary: removal in install transaction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 26
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1168949 1203699 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-03 21:22 UTC by Matthew Miller
Modified: 2017-06-16 13:19 UTC (History)
9 users (show)

Fixed In Version: dnf-2.5.1-1.fc26
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-16 13:19:24 UTC
Type: Bug


Attachments (Terms of Use)

Description Matthew Miller 2014-11-03 21:22:58 UTC
So, this happened:

$ sudo dnf install inkscape
Package inkscape-0.48.5-2.fc21.x86_64 is already installed, skipping.
Dependencies resolved.
================================================================================
 Package                   Arch        Version               Repository    Size
================================================================================
Removing:
 kernel                    x86_64      3.16.4-200.fc20       @System      138 M
 kernel-modules-extra      x86_64      3.16.4-200.fc20       @System      8.2 M

Transaction Summary
================================================================================
Remove  2 Packages

Installed size: 146 M
Is this ok [y/N]: n
Operation aborted.


------

It turns out that after doing fedup, I had 4 kernels installed, and installonly_limit=3. DNF apparently wants to bring that into compliance, but it's quite surprising for it to do that in an otherwise unrelated transaction.


Shouldn't this only happen when adding a new kernel (or other installonly package where the limit is exceeded)?

Comment 1 Jan Zeleny 2014-11-04 07:29:47 UTC
> Shouldn't this only happen when adding a new kernel (or other installonly
> package where the limit is exceeded)?

It depends. While I see this behavior can be confusing, it makes a perfect sense from dnf's perspective. It's important to realize that this situation would not have happened if fedup was using dnf as installer. If that was the case, dnf would have erased the old kernels right away. Installing them "manually" (which is pretty much what fedup does IIRC) technically breaks consistency of the system from libsolv's perspective. It is therefore fixed in the first transaction possible.

I leave the decision up to dnf developers but I recommend this bug to be closed as notabug.

Comment 2 Honza Silhan 2014-11-04 15:35:47 UTC
Thanks for input, Jan, closing.

Comment 3 Matthew Miller 2014-11-04 15:41:48 UTC
I see the consistency argument, and there are pros and cons. With experience from apt4rpm in the olden days, which did a similar thing, it's easy for some error in the repository to cause the entire system to reform itself into a self-consistent state that the user very much did not want. Yum's more conservative approach is nicer for sysadmins — tell me there's a problem but let me choose when to solve it.

Even if this behavior stays the default, could DNF

a) Provide text explaining why the unrelated removal is happening

and

b) Provide some option for doing just what was asked and delaying the fix for later?

?

Thanks!

Comment 4 Jan Zeleny 2014-11-04 19:03:14 UTC
Setting low prio. The issue is not exactly critical and the dnf team has more important things to work on.

Also, one of the key aspects of dnf design is to have clean and maintainable code base. If addressing corner case like this would add more than a few lines of code, I would strongly advise against it.

Comment 5 Vít Ondruch 2014-11-28 14:00:12 UTC
*** Bug 1168949 has been marked as a duplicate of this bug. ***

Comment 6 Vít Ondruch 2014-11-28 14:06:21 UTC
From my POV, DNF should execute the operations atomically. When I want to install something, it should touch only related packages. If nothing else, it helps when searching history when some change happened.

I tried to use '-x kernel*' to exclude the kernel from transaction, but unfortunately, it seems to be ignored :/

Comment 7 Honza Silhan 2015-07-20 11:42:49 UTC
we should either document why DNF wants to remove something or apply the installonly limit when installonly package is involved  only.

Comment 8 Honza Silhan 2015-07-21 11:33:56 UTC
*** Bug 1203699 has been marked as a duplicate of this bug. ***

Comment 9 Fedora End Of Life 2015-11-04 10:19:36 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. 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 '21'.

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 21 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 10 Fedora End Of Life 2015-12-02 04:40:28 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 11 Yanko Kaneti 2015-12-02 06:05:17 UTC
This bug is still there. Reopening.

Comment 12 Fedora Admin XMLRPC Client 2016-07-08 09:34:17 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 13 Fedora End Of Life 2016-11-24 11:16:15 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 '23'.

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 23 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 14 Jaroslav Mracek 2016-11-30 08:18:14 UTC
Still valid:
Problem is when number of installonlypkg is decreased.
sudo dnf install gedit
Last metadata expiration check: 0:22:05 ago on Wed Nov 30 08:52:21 2016 CET.
Package gedit-2:3.22.0-2.fc25.x86_64 is already installed, skipping.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                  Arch                                         Version                                                Repository                                      Size
===================================================================================================================================================================================================================
Removing:
 kernel                                                   x86_64                                       4.8.6-201.fc24                                         @updates                                         0  
 kernel-core                                              x86_64                                       4.8.6-201.fc24                                         @updates                                        52 M
 kernel-debug-devel                                       x86_64                                       4.8.6-201.fc24                                         @updates                                        41 M
 kernel-modules                                           x86_64                                       4.8.6-201.fc24                                         @updates                                        22 M

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

Installed size: 114 M
Is this ok [y/N]: 
Operation aborted.
[test@dhcp-0-213 ~]$ rpm -q dnf
dnf-2.0.0-0.rc1.1.git.0.1d82616.fc25.noarch

Comment 15 Fedora End Of Life 2017-02-28 09:38:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 16 Jaroslav Mracek 2017-05-18 08:29:12 UTC
I created pull-request (https://github.com/rpm-software-management/libdnf/pull/288) that should solve the problem

Comment 17 Fedora Update System 2017-06-12 15:31:13 UTC
dnf-plugins-core-2.1.1-1.fc26 libdnf-0.9.1-1.fc26 dnf-2.5.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c87c47dccb

Comment 18 Fedora Update System 2017-06-14 01:36:27 UTC
dnf-2.5.1-1.fc26, dnf-plugins-core-2.1.1-1.fc26, libdnf-0.9.1-1.fc26 has been pushed to the Fedora 26 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-2017-c87c47dccb

Comment 19 Fedora Update System 2017-06-14 05:35:12 UTC
dnf-2.5.1-1.fc26 dnf-plugins-core-2.1.1-1.fc26 dnfdaemon-0.3.18-3.fc26 libdnf-0.9.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c87c47dccb

Comment 20 Fedora Update System 2017-06-15 13:56:32 UTC
dnf-2.5.1-1.fc26, dnf-plugins-core-2.1.1-1.fc26, dnfdaemon-0.3.18-3.fc26, libdnf-0.9.1-1.fc26 has been pushed to the Fedora 26 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-2017-c87c47dccb

Comment 21 Fedora Update System 2017-06-16 13:19:24 UTC
dnf-2.5.1-1.fc26, dnf-plugins-core-2.1.1-1.fc26, dnfdaemon-0.3.18-3.fc26, libdnf-0.9.1-1.fc26 has been pushed to the Fedora 26 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.