Bug 1249427 - upon install or upgrade, dnf removes kernel even if there are fewer than installonly_limit kernels installed
Summary: upon install or upgrade, dnf removes kernel even if there are fewer than inst...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-02 22:23 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2015-08-03 11:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-03 11:08:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2015-08-02 22:23:07 UTC
Description of problem:
Upon install or upgrade, dnf removes one existing kernel even if there are fewer than installonly_limit kernels installed.

Version-Release number of selected component (if applicable):
$ rpm -qa  \*dnf\* \*hawkey\*|sort
dnf-1.0.2-3.fc22.noarch
dnf-conf-1.0.2-3.fc22.noarch
dnf-langpacks-0.11.1-1.fc22.noarch
dnf-plugins-core-0.1.9-1.fc22.noarch
dnf-yum-1.0.2-3.fc22.noarch
hawkey-0.5.9-3.fc22.x86_64
python-dnf-1.0.2-3.fc22.noarch
python-dnf-plugins-core-0.1.9-1.fc22.noarch
python-dnf-plugins-extras-common-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-migrate-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-repomanage-0.0.9-1.fc22.noarch
python-hawkey-0.5.9-3.fc22.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Have the following kernels installed:
$ rpm -q kernel
kernel-4.0.7-300.fc22.x86_64
kernel-4.0.8-300.fc22.x86_64
2. Make sure installonly_limit is more than 2:
$ grep installonly /etc/dnf/dnf.conf 
installonly_limit=3
3. dnf upgrade or dnf install kernel

Actual results:
dnf tries to install kernel-4.1.3-200.fc22 (expected) and remove kernel-4.0.7-300.fc22 (not expected!)

Expected results:
dnf should only install the requested kernel, not remove any that are below installonly_limit.

Comment 1 Dominik 'Rathann' Mierzejewski 2015-08-02 23:38:06 UTC
Actually, bumping installonly_limit to 4 makes dnf keep 3 kernels as expected, so I'm suspecting an off-by-one error in the code. Could this be a duplicate of bug 1214562 or is this another issue?

Comment 2 Dominik 'Rathann' Mierzejewski 2015-08-03 11:08:31 UTC
Sorry for the noise. I found that I only removed kernel, but kernel-core and kernel-modules were still there, so everything works as designed.


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