Bug 1229946 - dnf autoremove conflicts with protected packages
Summary: dnf autoremove conflicts with protected packages
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1239239 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-10 01:30 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2016-11-30 08:45 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-30 08:45:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1114422 0 high CLOSED [rfe] Provide hooks functionality 2021-02-22 00:41:40 UTC

Internal Links: 1114422

Description Zbigniew Jędrzejewski-Szmek 2015-06-10 01:30:39 UTC
Description of problem:
[test@f23 ~]$ sudo dnf remove systemd-devel
Dependencies resolved.
Error: The operation would result in removing the following protected packages: systemd.

That is with clean_requirements_on_remove=true. If I comment this line out in /etc/dnf/dnf.conf, uninstall proceeds without issue. I think autoremove should instead stop on protected packages.

Version-Release number of selected component (if applicable):
dnf-1.0.0-1.fc23.noarch
python-dnf-plugins-core-0.1.8-1.fc23.noarch

Comment 1 Jan Kurik 2015-07-15 14:02:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

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

Comment 2 Honza Silhan 2015-07-24 12:26:04 UTC
We could reconsider adding protected_pkgs API to DNF or enhance protected_packages plugin to exclude protected packages from remove set.

Comment 3 Zbigniew Jędrzejewski-Szmek 2015-07-25 18:23:23 UTC
From the outside, enhancing the plugin seems like a cleaner solution.

Comment 4 Honza Silhan 2015-07-29 12:59:54 UTC
*** Bug 1239239 has been marked as a duplicate of this bug. ***

Comment 5 Aniruddha 2015-09-03 17:59:08 UTC
Is it possible to create a base group with programs such as dnf and systemd? Currently is is impossible to remove certain groups due to the " The operation would result in removing the following protected packages: systemd, dnf." error.

For example if I would like to remove the "Fedora Workstation" group this is impossible because this would try to remove dnf and systemd. These packages shouldn't belong in "Fedora Workstation" but in a separate group. Fedora Workstation should only consist of Xorg and Gnome.

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

Comment 7 Fedora End Of Life 2016-11-24 11:52:46 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 8 Jaroslav Mracek 2016-11-30 08:45:43 UTC
It seems that problem was fixed in upstream:

sudo dnf install systemd-devel
Last metadata expiration check: 0:49:26 ago on Wed Nov 30 08:52:21 2016 CET.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                Arch                                            Version                                              Repository                                       Size
===================================================================================================================================================================================================================
Installing:
 systemd-devel                                          x86_64                                          231-10.fc25                                          fedora                                          292 k

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total download size: 292 k
Installed size: 254 k
Is this ok [y/N]: y
Downloading Packages:
systemd-devel-231-10.fc25.x86_64.rpm                                                                                                                                               623 kB/s | 292 kB     00:00    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              154 kB/s | 292 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : systemd-devel-231-10.fc25.x86_64                                                                                                                                                               1/1 
  Verifying   : systemd-devel-231-10.fc25.x86_64                                                                                                                                                               1/1 

Installed:
  systemd-devel.x86_64 231-10.fc25                                                                                                                                                                                 

Complete!
[test@dhcp-0-213 ~]$ sudo dnf remove systemd-devel
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                               Arch                                           Version                                                Repository                                       Size
===================================================================================================================================================================================================================
Removing:
 systemd-devel                                         x86_64                                         231-10.fc25                                            @fedora                                         254 k

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

Installed size: 254 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing     : systemd-devel-231-10.fc25.x86_64                                                                                                                                                               1/1 
  Verifying   : systemd-devel-231-10.fc25.x86_64                                                                                                                                                               1/1 

Removed:
  systemd-devel.x86_64 231-10.fc25                                                                                                                                                                                 

Complete!
[test@dhcp-0-213 ~]$ rpm -q dnf
dnf-2.0.0-0.rc1.1.git.0.1d82616.fc25.noarch


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