Bug 1279066 - RFE: dnf don't mark running kernel for removal
RFE: dnf don't mark running kernel for removal
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
23
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-07 11:26 EST by Marc Muehlfeld
Modified: 2015-11-09 11:57 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-09 11:57:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marc Muehlfeld 2015-11-07 11:26:25 EST
Description of problem:
The command "dnf remove kernel", removes all kernel - including the one, that is currently active. Before F21 and also in RHEL, all kernels will be removed - except the current one. This behaviour should be back, to prevent uninstalling all kernels and can't boot any more.



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



How reproducible:
Always.



Steps to Reproduce:
1. Have at least two kernel packages installed on your system.
2. Run "dnf remove kernel"



Actual results:
dnf offers to remove all kernel packages - including the one that is currently active.



Expected results:
dnf should skip the current active kernel for removal (like it was before F21 and also is in RHEL)



Additional info:
This bug was already reported for yum in Fedora 21 (Bug #1175532), but this one was closed, because F21 is EOL. I opened a new one, because meanwhile it's dnf and not yum any more.
Comment 1 Honza Silhan 2015-11-09 09:07:29 EST
The running kernel is never removed - protected_packages from dnf-plugins-core component reports it and halts the operation.
Comment 2 Marc Muehlfeld 2015-11-09 11:57:47 EST
I digged a bit deeper and find out, that the "kernel" package doesn't contain any files (any more?):

# rpm -qlp kernel-4.2.5-300.fc23.x86_64.rpm 
(enthält keine Dateien)    -> in english: contains no files

I don't understand the sense of a package without files, but this shouldn't be part of this request :-)

The kernel is inside the package kernel-core. And for that, Jan's reply is correct. The active Kernel isn't removed:

# dnf remove kernel-core
Abhängigkeiten sind aufgelöst.
Fehler: The operation would result in removing the booted kernel: kernel-core-4.2.5-300.fc23.x86_64.

Sorry for the noise. I set the status to NOTABUG.

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