Bug 1442954 - Can no longer update - "The operation would result in removing the following protected packages: kernel"
Summary: Can no longer update - "The operation would result in removing the following ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-18 07:45 UTC by Ade Bradshaw
Modified: 2023-10-06 17:36 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-07 08:25:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dnf debug dir (8.86 MB, application/x-gzip)
2017-04-18 07:45 UTC, Ade Bradshaw
no flags Details

Description Ade Bradshaw 2017-04-18 07:45:28 UTC
Created attachment 1272233 [details]
dnf debug dir

Description of problem:
When doing a dnf update it fails with a message "The operation would result in removing the following protected packages: kernel"


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

How reproducible:
100%

Steps to Reproduce:
1. dnf update (on my laptop)
2.
3.

Actual results:
Fails to update and gives ""The operation would result in removing the following protected packages: kernel"

Expected results:
Installation of the latest updates

Additional info:
Debug file attached 

Example:

$ sudo dnf update --best 
Last metadata expiration check: 0:23:29 ago on Tue Apr 18 09:21:08 2017 CEST.
Error: The operation would result in removing the following protected packages: kernel
(try to add '--allowerasing' to command line to replace conflicting packages)

Comment 1 Jaroslav Mracek 2017-04-19 11:24:28 UTC
Please can you provide additional info:
What is content of dnf.conf?
What is running kernel? Is it the oldest one?

Comment 2 Ade Bradshaw 2017-04-20 16:02:49 UTC
Hi 

I was using kernel-4.11.0-0.rc5.git0.1.fc26.x86_64  at the time 

Today I managed to get to rc7 by changing my dnf.conf to keep 5 ...

# cat /etc/dnf/dnf.conf 
[main]
gpgcheck=1
installonly_limit=5
clean_requirements_on_remove=True
#installonlypkgs=electron
#exclude=atom-* libgcrypt*

I just changed it back to 3 and got the same error

$  sudo dnf update
Last metadata expiration check: 2:36:00 ago on Thu Apr 20 15:24:18 2017 CEST.
Error: The operation would result in removing the following protected packages: kernel
(try to add '--allowerasing' to command line to replace conflicting packages)

 $  uname -a
Linux laptop.adrians.computer 4.11.0-0.rc7.git0.1.fc26.x86_64 #1 SMP Mon Apr 17 18:09:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$  rpm  -qa | grep ^kernel
kernel-devel-4.11.0-0.rc7.git0.1.fc26.x86_64
kernel-4.11.0-0.rc5.git0.1.fc26.x86_64
kernel-modules-4.10.8-200.fc25.x86_64
kernel-4.11.0-0.rc7.git0.1.fc26.x86_64
kernel-modules-4.10.6-200.fc25.x86_64
kernel-4.10.8-200.fc25.x86_64
kernel-devel-4.11.0-0.rc5.git0.1.fc26.x86_64
kernel-devel-4.10.8-200.fc25.x86_64
kernel-core-4.10.8-200.fc25.x86_64
kernel-modules-4.11.0-0.rc7.git0.1.fc26.x86_64
kernel-core-4.10.6-200.fc25.x86_64
kernel-4.10.6-200.fc25.x86_64
kernel-devel-4.10.6-200.fc25.x86_64
kernel-modules-4.11.0-0.rc5.git0.1.fc26.x86_64
kernel-core-4.11.0-0.rc5.git0.1.fc26.x86_64
kernel-core-4.11.0-0.rc7.git0.1.fc26.x86_64
kernel-headers-4.11.0-0.rc7.git0.1.fc26.x86_64

Comment 3 Jaroslav Mracek 2017-04-20 16:22:43 UTC
Please can you perform "dnf remove kernel*-4.10.6-200.fc25.x86_64" ?

Comment 4 Jaroslav Mracek 2017-04-20 16:26:21 UTC
Is something obsoletes kernel? You can get it form "sudo dnf repoquery --whatobsoletes kernel".

Comment 5 Jaroslav Mracek 2017-04-20 16:34:46 UTC
You report the problem for "dnf update", please try "dnf update kernel", if update kernel works and general update doesn't please try to select problematic combination of packages.

Comment 6 Ade Bradshaw 2017-04-25 07:39:18 UTC
$ sudo dnf remove kernel*-4.10.6-200.fc25.x86_64
Error: The operation would result in removing the following protected packages: kernel


$ sudo dnf repoquery --whatobsoletes kernel
Last metadata expiration check: 0:30:06 ago on Tue Apr 25 09:08:32 2017 CEST.

Comment 7 Ade Bradshaw 2017-04-25 07:39:55 UTC
$ sudo dnf update kernel
Last metadata expiration check: 0:30:58 ago on Tue Apr 25 09:08:32 2017 CEST.
Error: The operation would result in removing the following protected packages: kernel
(try to add '--allowerasing' to command line to replace conflicting packages)

Comment 8 Jaroslav Mracek 2017-04-28 13:47:11 UTC
Let's try something else. Please can you look for content in files /etc/yum/protected.d/*.conf and /etc/dnf/protected.d/*.conf .

I have there only dnf, systemd, systemd-udev. I expect that you have additionally "kernel" there. If yes, removal of "kernel" entry will solve your problem. Also identification of the package that provided that entry would be interesting. Please, can you provide if this helped.

Comment 9 Ade Bradshaw 2017-05-29 16:16:16 UTC
You are right, this is the output 

 $ sudo ls /etc/yum/protected.d/*.conf
/etc/yum/protected.d/sudo.conf  /etc/yum/protected.d/systemd.conf

 $ sudo ls /etc/dnf/protected.d/*.conf
/etc/dnf/protected.d/dnf.conf  /etc/dnf/protected.d/kernel.conf

I can check the fix you suggest at the moment as I dont have a kernel to upgrade (Ive been using rpm -e to erase them manually so I could update)

Will update here once there is an update available, thanks for your help

Comment 10 Ade Bradshaw 2017-06-07 06:35:45 UTC
I can confirm, removing the following file allowed me to update as normal

 /etc/dnf/protected.d/kernel.conf

Happy to close this, many thanks

Comment 11 Jaroslav Mracek 2017-06-07 08:25:40 UTC
You are welcome.


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