Bug 1190141 - dnf autoerase -- erases more than "leaf" packages
Summary: dnf autoerase -- erases more than "leaf" packages
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1222076 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-06 12:51 UTC by meine
Modified: 2016-07-19 12:47 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 12:47:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dnf autoremove misbehaviour (4.95 KB, text/plain)
2015-07-01 06:37 UTC, teccie
no flags Details
dnf autoremove -v (7.22 KB, text/plain)
2015-07-20 15:57 UTC, Kamil Páral
no flags Details
dnf history userinstalled (1.60 KB, text/plain)
2015-07-20 15:57 UTC, Kamil Páral
no flags Details
history record of installing gcc (1.33 KB, text/plain)
2015-07-20 15:57 UTC, Kamil Páral
no flags Details
history record of installing libguestfs-tools (1.43 KB, text/plain)
2015-07-20 15:57 UTC, Kamil Páral
no flags Details
history record of installing python-doit (704 bytes, text/plain)
2015-07-20 15:58 UTC, Kamil Páral
no flags Details
debugdata from --debugsolver (6.72 MB, application/x-7z-compressed)
2015-07-20 15:58 UTC, Kamil Páral
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1222812 0 unspecified CLOSED dnf autoremoves zlib 2021-02-22 00:41:40 UTC

Internal Links: 1222812

Description meine 2015-02-06 12:51:59 UTC
Description of problem:
'dnf autoerase' is ment to remove "leaf" packages, no longer needed packages and former dependencies. 

it shows that the autoerase also erases other packages that are to be kept which are no dependencies -- like xpdf (including libXp, motif as proper dependencies), gxine, ranger, newsbeuter, gummi, i3, i3status. I didn't check all dependencies of the software mentioned. these packages are user-installed on a Fedora 20 LXDE base system. 

packages like AbiWord, Midori, PCmanFM are pre installed F20 LXDE and don't show in the suggested autoerase list.

packages like irssi, LostIRC are user-installed but don't show in the suggested autoerase list.

Version-Release number of selected component (if applicable):
0.5.4
  Installed: dnf-0:0.5.4-2.fc20.noarch at 2014-09-10 19:28
  Built    : Fedora Project at 2014-07-29 05:52

  Installed: rpm-0:4.11.3-2.fc20.i686 at 2014-12-30 23:47
  Built    : Fedora Project at 2014-12-12 16:26

How reproducible:
every time

Steps to Reproduce:
1. $ su -
2. # dnf autoerase [skipping the -y shows a list of to be erased packages]
3. review of the output shows packages to be kept like described above

Actual results:
dnf autoerase erases packages that are to be kept

Expected results:
should only erase "leaf" packages, former dependencies of no use

Additional info:
could be in combination dnf and libsolv, but I can't check. used version of libsolv:
Name        : libsolv
Arch        : i686
Epoch       : 0
Version     : 0.6.4

Comment 1 Jaroslav Reznik 2015-03-03 16:50:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 teccie 2015-07-01 06:37:57 UTC
Created attachment 1044918 [details]
dnf autoremove misbehaviour

This log shows how 'dnf autoremove' tries to remove a package that 'dnf upgrade' wants to keep installed.

Comment 3 teccie 2015-07-01 06:39:38 UTC
I just ran into the issue that you can see in the log that I just attached. I hope it's related to this bug.

Comment 4 Honza Silhan 2015-07-20 13:33:47 UTC
Thanks for the report, we'll take a look.

Comment 5 Kamil Páral 2015-07-20 15:54:44 UTC
I can reproduce this as well. dnf autoremove tries to remove packages I have explicitly installed (not deps). Out of this:

================================================================================
 Package                    Arch       Version                Repository   Size
================================================================================
Removing:
 cpp                        x86_64     5.1.1-4.fc22           @System      22 M
 esmtp                      x86_64     1.0-13.fc22            @System      93 k
 gcc                        x86_64     5.1.1-4.fc22           @System      46 M
 hivex                      x86_64     1.3.11-5.fc22          @System     233 k
 isl                        x86_64     0.14-3.fc22            @System     1.4 M
 libesmtp                   x86_64     1.0.6-8.fc22           @System     146 k
 libguestfs                 x86_64     1:1.29.50-1.fc22       @System     3.7 M
 libguestfs-tools           noarch     1:1.29.50-1.fc22       @System      57 k
 libguestfs-tools-c         x86_64     1:1.29.50-1.fc22       @System      15 M
 libldm                     x86_64     0.2.3-7.fc22           @System     125 k
 libmpc                     x86_64     1.0.2-3.fc22           @System     115 k
 lsscsi                     x86_64     0.28-1.fc22            @System      98 k
 perl-String-ShellQuote     noarch     1.04-14.fc22           @System      17 k
 perl-Sys-Guestfs           x86_64     1:1.29.50-1.fc22       @System     1.2 M
 perl-XML-Writer            noarch     0.625-2.fc22           @System      65 k
 perl-XML-XPath             noarch     1.13-26.fc22           @System     189 k
 perl-hivex                 x86_64     1.3.11-5.fc22          @System      77 k
 perl-libintl               x86_64     1.20-16.fc22           @System     4.3 M
 python-doit                noarch     0.28.0-1.fc22          @System     490 k
 python-inotify             noarch     0.9.6-1.fc22           @System     263 k
 scrub                      x86_64     2.5.2-6.fc22           @System     120 k
 supermin                   x86_64     5.1.12-1.fc22          @System     1.7 M
 zerofree                   x86_64     1.0.3-3.fc22           @System      47 k

Transaction Summary
================================================================================
Remove  23 Packages

at least gcc, libguestfs-tools and python-doit were manually installed. The strange thing is that "dnf history userinstalled" doesn't list them. But I can find records in dnf history to prove that I manually installed them. So maybe userinstalled is not correctly populated? Will attach logs.

dnf-1.0.1-2.fc22.noarch
rpm-4.12.0.1-12.fc22.x86_64
libsolv-0.6.11-1.fc22.x86_64
hawkey-0.5.7-1.fc22.x86_64
librepo-1.7.16-1.fc22.x86_64

Comment 6 Kamil Páral 2015-07-20 15:57:12 UTC
Created attachment 1053975 [details]
dnf autoremove -v

Comment 7 Kamil Páral 2015-07-20 15:57:20 UTC
Created attachment 1053976 [details]
dnf history userinstalled

Comment 8 Kamil Páral 2015-07-20 15:57:46 UTC
Created attachment 1053977 [details]
history record of installing gcc

Comment 9 Kamil Páral 2015-07-20 15:57:54 UTC
Created attachment 1053978 [details]
history record of installing libguestfs-tools

Comment 10 Kamil Páral 2015-07-20 15:58:02 UTC
Created attachment 1053979 [details]
history record of installing python-doit

Comment 11 Kamil Páral 2015-07-20 15:58:53 UTC
Created attachment 1053980 [details]
debugdata from --debugsolver

Comment 12 Honza Silhan 2015-07-22 12:47:49 UTC
*** Bug 1222076 has been marked as a duplicate of this bug. ***

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

Comment 14 Fedora End Of Life 2016-07-19 12:47:04 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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.


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