Bug 976704

Summary: [kernel] [doc] dnf erase kernel removing all kernels
Product: [Fedora] Fedora Reporter: Igor Gnatenko <ignatenko>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: akozumpl, ignatenko, packaging-team-maint, pnemade
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.3.8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-13 15:16:20 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 Igor Gnatenko 2013-06-21 08:29:01 UTC
Description of problem:


Version-Release number of selected component (if applicable):
dnf-0.3.7-1.gitf8bdc98.fc19.noarch

How reproducible:
always

Steps to Reproduce:
1. yum remove kernel
2. dnf erase kernel

Actual results:
dnf remove *all* kernels at the moment
yum remove not using kernels at the moment

Expected results:
dnf remove not using kernels at the moment

Additional info:
# dnf erase kernel
Setting up Remove Process
Resolving Dependencies
--> Starting dependency resolution
--> Finding unneeded leftover dependencies

...

---> Package kernel.x86_64 3.9.3-301.fc19 will be erased
---> Package kernel.x86_64 3.9.4-300.fc19 will be erased
---> Package kernel.x86_64 3.9.5-301.fc19 will be erased
---> Package kernel-modules-extra.x86_64 3.9.3-301.fc19 will be erased
---> Package kernel-modules-extra.x86_64 3.9.4-300.fc19 will be erased
---> Package kernel-modules-extra.x86_64 3.9.5-301.fc19 will be erased

...

Transaction Summary
=====================================================================================================================================================
Remove  81 Packages

Installed size: 0  
Is this ok [y/N]

# yum erase kernel
Loaded plugins: langpacks, refresh-packagekit
Skipping the running kernel: kernel-3.9.5-301.fc19.x86_64
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:3.9.3-301.fc19 will be erased
--> Processing Dependency: kernel-uname-r = 3.9.3-301.fc19.x86_64 for package: kernel-modules-extra-3.9.3-301.fc19.x86_64
--> Processing Dependency: kernel-uname-r = 3.9.3-301.fc19.x86_64 for package: 1:kmod-nvidia-3.9.3-301.fc19.x86_64-319.23-1.fc19.x86_64
---> Package kernel.x86_64 0:3.9.4-300.fc19 will be erased
--> Processing Dependency: kernel-uname-r = 3.9.4-300.fc19.x86_64 for package: 1:kmod-nvidia-3.9.4-300.fc19.x86_64-319.23-1.fc19.3.x86_64
--> Processing Dependency: kernel-uname-r = 3.9.4-300.fc19.x86_64 for package: kernel-modules-extra-3.9.4-300.fc19.x86_64
--> Running transaction check
---> Package kernel-modules-extra.x86_64 0:3.9.3-301.fc19 will be erased
---> Package kernel-modules-extra.x86_64 0:3.9.4-300.fc19 will be erased

...

--> Finished Dependency Resolution

...

Transaction Summary
=====================================================================================================================================================
Remove  2 Packages (+4 Dependent packages)

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

Comment 1 Ales Kozumplik 2013-06-21 12:11:04 UTC
This is not a bug, there's no real reason besides some false user-protection to make an exception in the 'erase' semantics for kernel.

In fc85529 I document this difference from Yum:

http://akozumpl.github.io/dnf/cli_vs_yum.html#dnf-erase-kernel-deletes-all-packages-called-kernel

Comment 2 Igor Gnatenko 2013-06-21 13:06:09 UTC
(In reply to Ales Kozumplik from comment #1)
> This is not a bug, there's no real reason besides some false user-protection
> to make an exception in the 'erase' semantics for kernel.
> 
> In fc85529 I document this difference from Yum:
> 
> http://akozumpl.github.io/dnf/cli_vs_yum.html#dnf-erase-kernel-deletes-all-
> packages-called-kernel
I think this bug good idea. You think otherwise ?