Bug 1279066 - RFE: dnf don't mark running kernel for removal
Summary: RFE: dnf don't mark running kernel for removal
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: x86_64
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-11-07 16:26 UTC by Marc Muehlfeld
Modified: 2015-11-09 16:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-09 16:57:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1175532 0 unspecified CLOSED yum remove kernel 2021-02-22 00:41:40 UTC

Description Marc Muehlfeld 2015-11-07 16:26:25 UTC
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 14:07:29 UTC
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 16:57:47 UTC
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.