Bug 728794 - Removing a package tries to remove unrelated packages
Summary: Removing a package tries to remove unrelated packages
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-07 15:35 UTC by Felipe Contreras
Modified: 2012-02-02 19:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-02 19:27:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Exhibit A (622.58 KB, image/png)
2011-08-07 15:35 UTC, Felipe Contreras
no flags Details
yum grouperase "KDE Software Compilation" (73.14 KB, text/plain)
2011-08-07 18:11 UTC, Andre Robatino
no flags Details

Description Felipe Contreras 2011-08-07 15:35:45 UTC
Created attachment 517055 [details]
Exhibit A

Description of problem:
I installed KDE, now I want to uninstall KDE, PackageKit tells me it's going to remove a bunch of totally unrelated sw, such as gnome-panel, anaconda, xterm, gstreamer, bluez, gnome-shell, pidgin, empathy, etc.

Version-Release number of selected component (if applicable):
0.6.16

Steps to Reproduce:
1. Install KDE
2. Uninstall KDE
  
Actual results:
Many unrelated packages are listed for removal

Expected results:
Only relevant packages should be removed

Comment 1 Andre Robatino 2011-08-07 18:11:19 UTC
Created attachment 517067 [details]
yum grouperase "KDE Software Compilation"

Here's the text output of attempting this with command-line yum (and entering "N" at the prompt). I have a few extra repos, so can't be sure this is a Fedora issue.

Comment 2 Andre Robatino 2011-08-07 18:15:01 UTC
Should have mentioned the same thing happens with command-line yum.

Comment 3 Andre Robatino 2011-08-07 18:27:30 UTC
One of the first packages it wants to remove is cups-pk-helper, which is one of the default packages in "KDE Software Compilation". That triggers removing the gnome-related packages:

[root@compaq-pc ~]# yum erase cups-pk-helper
Loaded plugins: langpacks, presto, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package cups-pk-helper.x86_64 0:0.1.2-1.fc15 will be erased
--> Processing Dependency: cups-pk-helper for package: 1:control-center-3.0.2-1.fc15.x86_64
--> Running transaction check
---> Package control-center.x86_64 1:3.0.2-1.fc15 will be erased
--> Processing Dependency: libgnome-control-center.so.1()(64bit) for package: empathy-3.0.2-3.fc15.x86_64
--> Processing Dependency: libgnome-control-center.so.1()(64bit) for package: 1:gnome-bluetooth-3.0.1-1.fc15.x86_64
--> Processing Dependency: control-center for package: orca-3.0.1-1.fc15.x86_64
--> Processing Dependency: control-center for package: 1:gnome-bluetooth-3.0.1-1.fc15.x86_64
--> Running transaction check
---> Package empathy.x86_64 0:3.0.2-3.fc15 will be erased
---> Package gnome-bluetooth.x86_64 1:3.0.1-1.fc15 will be erased
--> Processing Dependency: libgnome-bluetooth-applet.so.0()(64bit) for package: gnome-shell-3.0.2-4.fc15.x86_64
---> Package orca.x86_64 0:3.0.1-1.fc15 will be erased
--> Running transaction check
---> Package gnome-shell.x86_64 0:3.0.2-4.fc15 will be erased
--> Processing Dependency: gnome-shell for package: gnome-panel-3.0.0.1-4.fc15.x86_64
--> Processing Dependency: gnome-shell for package: gnome-tweak-tool-3.0.5-2.fc15.noarch
--> Running transaction check
---> Package gnome-panel.x86_64 0:3.0.0.1-4.fc15 will be erased
--> Processing Dependency: gnome-panel for package: alacarte-0.13.2-3.fc15.noarch
---> Package gnome-tweak-tool.noarch 0:3.0.5-2.fc15 will be erased
--> Running transaction check
---> Package alacarte.noarch 0:0.13.2-3.fc15 will be erased
--> Processing Dependency: alacarte for package: awn-extras-applets-0.4.2-0.1.bzr1523.fc15.x86_64
--> Running transaction check
---> Package awn-extras-applets.x86_64 0:0.4.2-0.1.bzr1523.fc15 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================
 Package            Arch   Version                Repository              Size
===============================================================================
Removing:
 cups-pk-helper     x86_64 0.1.2-1.fc15           @anaconda-InstallationRepo-201105131943.x86_64
                                                                         121 k
Removing for dependencies:
 alacarte           noarch 0.13.2-3.fc15          @fedora                367 k
 awn-extras-applets x86_64 0.4.2-0.1.bzr1523.fc15 @updates                10 M
 control-center     x86_64 1:3.0.2-1.fc15         @updates                12 M
 empathy            x86_64 3.0.2-3.fc15           @updates                13 M
 gnome-bluetooth    x86_64 1:3.0.1-1.fc15         @updates               538 k
 gnome-panel        x86_64 3.0.0.1-4.fc15         @updates               9.4 M
 gnome-shell        x86_64 3.0.2-4.fc15           @updates               3.0 M
 gnome-tweak-tool   noarch 3.0.5-2.fc15           @updates               255 k
 orca               x86_64 3.0.1-1.fc15           @updates                12 M

Transaction Summary
===============================================================================
Remove       10 Package(s)

Installed size: 61 M
Is this ok [y/N]: N
Exiting on user Command
Complete!
[root@compaq-pc ~]#

Comment 4 Andre Robatino 2011-08-07 18:46:29 UTC
This appears to be the expected behavior of yum groupremove. From the yum man page:

       groupremove
              Is used to remove all  of  the  packages  in  a  group,  unlike
              "groupinstall"   this  will  remove  everything  regardless  of
              group_package_types. It is worth pointing out that packages can
              be  in  more  than one group, so "groupinstall X Y" followed by
              "groupremove Y" does  not  do  give  you  the  same  result  as
              "groupinstall X".

              The  groupremove_leaf_only  configuration changes the behaviour
              of this command to only remove packages which  aren't  required
              by something else.

Comment 5 Andre Robatino 2011-08-07 18:48:52 UTC
From the yum.conf man page:

              groupremove_leaf_only Either `0'  or  `1'.  Used  to  determine
              yum's  behaviour  when  the  groupremove  command  is  run.  If
              groupremove_leaf_only is `0' (default) then all packages in the
              group  will  be  removed.  If groupremove_leaf_only is `1' then
              only those packages  in  the  group  that  aren't  required  by
              another package will be removed.

Comment 6 Felipe Contreras 2011-08-07 19:48:55 UTC
(In reply to comment #4)
> This appears to be the expected behavior of yum groupremove. From the yum man
> page:

The fact that the wrong behavior is documented, doesn't make it the desired behavior.

yum has history now, and it's able to find out if a package was installed by the user, or it was a dependency. Therefore, it shouldn't matter if a package is a leaf, if it was installed by the user, it should not be removed.

Comment 7 Felipe Contreras 2012-02-02 19:27:40 UTC
(In reply to comment #6)
> yum has history now, and it's able to find out if a package was installed by
> the user, or it was a dependency. Therefore, it shouldn't matter if a package
> is a leaf, if it was installed by the user, it should not be removed.

But who cares about convenience. People should manually specify all the commands they want to remove in rpm by looking at /var/log/yum.log.

Because we all are geeks, and have too much time.


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