Bug 1279509

Summary: dnf does not protect itself from being removed by itself
Product: [Fedora] Fedora Reporter: Stefan Paletta <stefanp>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 23CC: jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-16 10:53:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Paletta 2015-11-09 15:36:32 UTC
Description of problem:

Despite /etc/dnf/protected.d/dnf.conf listing dnf, dnf will remove itself when asked, e.g. to remove python3.

$ cat /etc/dnf/protected.d/dnf.conf
dnf
$ 

Analysis with strace shows that this file is never accessed in the process.

Version-Release number of selected component (if applicable):
1.1.3-1.fc23

How reproducible:

sudo dnf -y remove python3

Actual results:

dnf removes python3 and packages that depend on it, including itself.

Expected results:

dnf aborts before removing any package.

Comment 1 Stefan Paletta 2015-11-16 10:53:00 UTC
Closing as notabug because installing dnf-plugins-core fixes it.

Technically still a bug because system-upgrade from F22 left the system without that package.