Bug 1239322 - Removing xguest shoudn't remove selinux dependency
Summary: Removing xguest shoudn't remove selinux dependency
Keywords:
Status: CLOSED DUPLICATE of bug 1292915
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-05 17:01 UTC by Luya Tshimbalanga
Modified: 2016-04-18 08:09 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-18 08:09:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[testcase] dnf remove xguest --debugsolver (5.11 KB, text/plain)
2015-11-27 17:10 UTC, Luya Tshimbalanga
no flags Details
[testcase] content from var/lib/dnf/20151028 (3.66 KB, text/plain)
2015-11-27 17:14 UTC, Luya Tshimbalanga
no flags Details
Requested debugdata folder (851.30 KB, application/x-xz)
2015-12-04 18:20 UTC, Luya Tshimbalanga
no flags Details
/var/lib/dnf/history folder (244.23 KB, application/x-xz)
2015-12-04 18:21 UTC, Luya Tshimbalanga
no flags Details

Description Luya Tshimbalanga 2015-07-05 17:01:57 UTC
Description of problem:
The installation is fine but removing xguest also drags selinux and its policy along it.

Version-Release number of selected component (if applicable):
1.0.10-31.fc21

How reproducible:
Always

Steps to Reproduce:
1.Install xguest
2.Remove xguest
3.

Actual results:
Removing xguest also erase selinux and its policies 

Expected results:
Only xguest and its dependencies from the installation are removed

Additional info:
Installing xguest:
Transaction ID : 41
Begin time     : Wed Jul  1 09:01:32 2015
Begin rpmdb    : 2176:57d65cdbe6b876bdc45855fb409967205be27d3d
End time       :            09:02:58 2015 (86 seconds)
End rpmdb      : 2182:89e63a1614a50549a4d86c583b0b0b96343293f9
User           : Luya Tshimbalanga <luya>
Return-Code    : Success
Command Line   : install xguest
Transaction performed with:
    Installed     dnf-1.0.1-2.fc22.noarch     (unknown)
    Upgraded      rpm-4.12.0.1-11.fc22.x86_64 (unknown)
Packages Altered:
    Install imlib2-1.4.6-3.fc22.x86_64                  @fedora
    Install openbox-3.5.2-7.fc22.x86_64                 @fedora
    Install openbox-libs-3.5.2-7.fc22.x86_64            @fedora
    Install policycoreutils-sandbox-2.3-16.fc22.x86_64  @fedora
    Install xguest-1.0.10-31.fc21.noarch                @fedora
    Install xorg-x11-server-Xephyr-1.17.2-1.fc22.x86_64 @updates
Scriptlet output:
   1 Changing password for user xguest.
   2 passwd: all authentication tokens updated successfully.


Attemp to remove xguest
$ sudo dnf erase xguest
[sudo] password for luya: 
Dependencies resolved.
================================================================================
 Package                     Arch       Version               Repository   Size
================================================================================
Removing:
 imlib2                      x86_64     1.4.6-3.fc22          @System     625 k
 openbox                     x86_64     3.6-3.fc22            @System     993 k
 openbox-libs                x86_64     3.6-3.fc22            @System     190 k
 policycoreutils-sandbox     x86_64     2.3-16.fc22           @System      26 k
 selinux-policy              noarch     3.13.1-128.4.fc22     @System      18 k
 selinux-policy-targeted     noarch     3.13.1-128.4.fc22     @System      10 M
 xguest                      noarch     1.0.10-31.fc21        @System      21 k
 xorg-x11-server-Xephyr      x86_64     1.17.2-1.fc22         @System     2.3 M

Transaction Summary
================================================================================
Remove  8 Packages

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

Comment 1 Petr Lautrbach 2015-10-02 10:48:09 UTC
This is the default dnf behaviour. If you want to change it, set 'clean_requirements_on_remove' to 'False' in your /etc/dnf/dnf.conf.

Comment 2 Luya Tshimbalanga 2015-10-02 16:56:45 UTC
(In reply to Petr Lautrbach from comment #1)
> This is the default dnf behaviour. If you want to change it, set
> 'clean_requirements_on_remove' to 'False' in your /etc/dnf/dnf.conf.

Then can you explain this behaviour below?

$ sudo dnf erase xguest
[sudo] password for luya: 
Dependencies resolved.
================================================================================
 Package                          Arch   Version                  Repository
                                                                           Size
================================================================================
Removing:
 adobe-source-han-sans-cn-fonts   noarch 1.004-1.fc23             @System  56 M
 adobe-source-han-sans-twhk-fonts noarch 1.004-1.fc22             @System  38 M
 aldusleaf-crimson-text-fonts     noarch 0.8-0.5.20130806.fc23    @System 660 k
 apanov-heuristica-fonts          noarch 1:1.0.2-5.fc23           @System 1.3 M
 google-roboto-common             noarch 1.2-9.fc23               @System 297 k
 google-roboto-condensed-fonts    noarch 1.2-9.fc23               @System 684 k
 google-roboto-fonts              noarch 1.2-9.fc23               @System 1.4 M
 imlib2                           x86_64 1.4.6-4.fc23             @System 608 k
 impallari-lobster-fonts          noarch 1.4-10.fc23              @System  38 k
 linux-libertine-fonts            noarch 5.3.0-7.2012_07_02.fc23  @System 3.3 M
 linux-libertine-fonts-common     noarch 5.3.0-7.2012_07_02.fc23  @System  93 k
 openbox                          x86_64 3.6.1-1.fc23             @System 1.0 M
 openbox-libs                     x86_64 3.6.1-1.fc23             @System 188 k
 paratype-pt-sans-caption-fonts   noarch 20141121-2.fc23          @System 745 k
 paratype-pt-serif-caption-fonts  noarch 20141121-2.fc23          @System 718 k
 paratype-pt-serif-fonts          noarch 20141121-2.fc23          @System 1.3 M
 policycoreutils-sandbox          x86_64 2.4-12.fc23              @System  26 k
 selinux-policy-targeted          noarch 3.13.1-147.fc23          @System  11 M
 sil-doulos-fonts                 noarch 4.104-13.fc23            @System 2.1 M
 tangerine-fonts                  noarch 1.3-4.fc23               @System 126 k
 tlomt-junction-fonts             noarch 2.0-12.fc23              @System  23 k
 tlomt-league-gothic-fonts        noarch 1.0-9.fc23               @System  18 k
 tlomt-orbitron-fonts             noarch 1.000-11.fc23            @System  84 k
 xguest                           noarch 1.0.10-32.fc23           @System  21 k
 xorg-x11-server-Xephyr           x86_64 1.18.0-0.4.20150907.fc23 @System 2.3 M
 yanone-kaffeesatz-fonts          noarch 20100514-9.fc23          @System 534 k

Transaction Summary
================================================================================
Remove  26 Packages

Installed size: 122 M
Is this ok [y/N]: 


That is really broken requirement considering removing xguest should only drag xorg-x11-server-Xephyr and openbox in this case.

Comment 3 Petr Lautrbach 2015-10-02 18:07:45 UTC
I'd say that it depends which requirements were installed with xguest. E.g. on my system:

# dnf install xguest
Installing:
 xguest                                noarch                                1.0.10-32.fc23                                  rawhide                                 21 k
Transaction Summary
==========================================================================================================================================================================
Install  1 Package



# dnf remove xguest
Removing:
 xguest                                noarch                                1.0.10-32.fc23                                 @rawhide                                 21 k

Transaction Summary
==========================================================================================================================================================================
Remove  1 Package

Comment 4 Luya Tshimbalanga 2015-10-03 19:40:16 UTC
(In reply to Petr Lautrbach from comment #3)
> I'd say that it depends which requirements were installed with xguest. 

In my case using default dnf behaviour
$ sudo dnf install xguest
================================================================================
 Package                   Arch     Version             Repository         Size
================================================================================
Installing:
 openbox                   x86_64   3.6.1-1.fc23        fedora            321 k
 openbox-libs              x86_64   3.6.1-1.fc23        fedora             86 k
 policycoreutils-sandbox   x86_64   2.4-12.fc23         updates-testing   173 k
 xguest                    noarch   1.0.10-32.fc23      fedora             21 k

Transaction Summary
================================================================================
Install  4 Packages

Total download size: 602 k
Installed size: 1.2 M

Removing it produce the result form comment #0 yet doing history undo 


$ sudo dnf history undo 112

Undoing transaction 112, from Sat Oct  3 12:29:26 2015
    Install openbox-3.6.1-1.fc23.x86_64                @fedora
    Install openbox-libs-3.6.1-1.fc23.x86_64           @fedora
    Install policycoreutils-sandbox-2.4-12.fc23.x86_64 @updates-testing
    Install xguest-1.0.10-32.fc23.noarch               @fedora
================================================================================
 Package                     Arch       Version               Repository   Size
================================================================================
Removing:
 openbox                     x86_64     3.6.1-1.fc23          @System     1.0 M
 openbox-libs                x86_64     3.6.1-1.fc23          @System     188 k
 policycoreutils-sandbox     x86_64     2.4-12.fc23           @System      26 k
 xguest                      noarch     1.0.10-32.fc23        @System      21 k

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

Installed size: 1.2 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing     : xguest-1.0.10-32.fc23.noarch                                1/4 
  Erasing     : policycoreutils-sandbox-2.4-12.fc23.x86_64                  2/4 
  Erasing     : openbox-3.6.1-1.fc23.x86_64                                 3/4 
  Erasing     : openbox-libs-3.6.1-1.fc23.x86_64                            4/4 
  Verifying   : openbox-3.6.1-1.fc23.x86_64                                 1/4 
  Verifying   : policycoreutils-sandbox-2.4-12.fc23.x86_64                  2/4 
  Verifying   : openbox-libs-3.6.1-1.fc23.x86_64                            3/4 
  Verifying   : xguest-1.0.10-32.fc23.noarch                                4/4 

Removed:
  openbox.x86_64 3.6.1-1.fc23                 openbox-libs.x86_64 3.6.1-1.fc23 
  policycoreutils-sandbox.x86_64 2.4-12.fc23  xguest.noarch 1.0.10-32.fc23     

Complete!


I am still baffled about the need to remove fonts and selinux-policy-targeted with default dnf setting. Is your dnf transaction on comment #3 done with default setting as well?

I succesfully reproduced the problem with other Fedora version 22 and Rawhide running on Gnome Boxes.

Comment 5 Luya Tshimbalanga 2015-10-03 19:42:05 UTC
Assigning to dnf package.

Comment 6 Luya Tshimbalanga 2015-10-03 19:56:30 UTC
Reopening because the bug still occurs and removing xguest should not also remove selinux-policy with default dnf behaviour.

Comment 7 Luya Tshimbalanga 2015-10-03 19:59:36 UTC
Relevant test running on clean installed Fedora Workstation after installing xguest:

$ sudo  dnf remove xguest
[sudo] password for experience: 
Dependencies resolved.
================================================================================
 Package                   Arch     Version                     Repository
                                                                           Size
================================================================================
Removing:
 imlib2                    x86_64   1.4.6-4.fc23                @System   608 k
 openbox                   x86_64   3.6.1-1.fc23                @System   1.0 M
 openbox-libs              x86_64   3.6.1-1.fc23                @System   188 k
 policycoreutils-sandbox   x86_64   2.4-12.fc23                 @System    26 k
 selinux-policy            noarch   3.13.1-147.fc23             @System    18 k
 selinux-policy-targeted   noarch   3.13.1-147.fc23             @System    11 M
 xguest                    noarch   1.0.10-32.fc23              @System    21 k
 xorg-x11-server-Xephyr    x86_64   1.18.0-0.4.20150907.fc23    @System   2.3 M

Transaction Summary
================================================================================
Remove  8 Packages

Installed size: 15 M
Is this ok [y/N]:

Comment 8 Michal Luscon 2015-10-19 12:53:59 UTC
Ok, now I see where the problem lies. Anaconda should mark all installed packages as installed by user. Unfortunately, there is currently no dnf api to do so. We will provide an api and ping anaconda guys afterwards.

Comment 9 Michal Luscon 2015-11-25 16:40:04 UTC
What kind of installation procedure did you use for that fresh Fedora Workstation? I am not able to reproduce it and DNF already treats packages installed by anaconda as installed by user.

Comment 10 Luya Tshimbalanga 2015-11-25 18:00:30 UTC
I created a root account during the installation, extra user account as admin is from post installation on gnome-shell. I then installed xguest as an example as usual using sudo. Trying to remove xguest again led to comment #7.dnf.conf is left untouched.

Comment 11 Michal Luscon 2015-11-26 09:05:15 UTC
But it was a fresh anaconda installation, right?

Comment 12 Luya Tshimbalanga 2015-11-26 10:40:43 UTC
Yes, it was. I can easily reproduce via Gnome Boxes too.

Comment 13 Michal Luscon 2015-11-27 14:04:25 UTC
Please run "dnf remove xguest --debugsolver" and attach produced debugdata into this report.

Comment 14 Michal Luscon 2015-11-27 14:08:37 UTC
... and also the content of your /var/lib/dnf/history.

Comment 15 Luya Tshimbalanga 2015-11-27 17:10:33 UTC
Created attachment 1099741 [details]
[testcase] dnf remove xguest --debugsolver

it seems --debugsolver does not do anything unless I missed something

Comment 16 Luya Tshimbalanga 2015-11-27 17:14:13 UTC
Created attachment 1099742 [details]
[testcase] content from var/lib/dnf/20151028

There were several directory inside 20151028 folder so I chose on named '1'. Both case are done on a stock Fedora 22 via Gnome Boxes.

Comment 17 Michal Luscon 2015-12-01 16:38:16 UTC
--debugsolver should have created a folder named debugdata in your $PWD and I really need /var/lib/dnf/history not /var/lib/dnf/20151028.

Comment 18 Michal Luscon 2015-12-01 16:50:36 UTC
Also please check whether this is not a duplicate of #1259865.

Comment 19 Luya Tshimbalanga 2015-12-04 18:20:06 UTC
Created attachment 1102379 [details]
Requested debugdata folder

Comment 20 Luya Tshimbalanga 2015-12-04 18:21:59 UTC
Created attachment 1102383 [details]
/var/lib/dnf/history folder

Requested folders included.

Comment 21 Luya Tshimbalanga 2015-12-04 18:26:54 UTC
(In reply to Michal Luscon from comment #18)
> Also please check whether this is not a duplicate of #1259865.

Looking by that number, #1259865 should be the duplicate in this case. At that time I didn't know it was a dnf issue.

Comment 22 Michal Luscon 2016-04-18 08:09:06 UTC
This is a duplicate of #1292915. Xguest package prerequires selinux-policy-targeted and policycoreutils-sandbox.

*** This bug has been marked as a duplicate of bug 1292915 ***


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