Description of problem:
Attempted a simple dnf update today on one of my boxes:
#dnf update
Last metadata expiration check performed 0:22:20 ago on Tue Feb 9 17:30:38 2016.
Dependencies resolved.
Error: The operation would result in removing the booted kernel: kernel-core-4.2.8-200.fc22.i686.
Never seen that before.
#rpm -q kernel
kernel-4.2.6-201.fc22.i686
kernel-4.2.8-200.fc22.i686
Why is dnf trying to get rid of 4.2.8 when it should be installing the newest one, and removing NONE because I have installonly_limit=3.
This box was yum upgraded (dist-sync) from 21 to 22 a few months ago, but so were a dozen other boxes I have and they aren't showing this behaviour (but they are almost all x64, not i686).
It gets weirder. Here's my dnf.conf:
[main]
gpgcheck=1
installonly_limit=3
installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules
clean_requirements_on_remove=true
The -PAE installonlypkgs should be irrelevant on this box which is not PAE and has no PAE installed:
#rpm -q kernel-PAE
package kernel-PAE is not installed
I use a standardized dnf.conf for all my boxes, so that is why installonlypkgs is set that way. It never hurt things in the past (we're talking 10 years here).
Watch this weirdness: change dnf.conf installonlypkgs to:
installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules kernel kernel-core kernel-modules
And now dnf update works fine (and does the right thing)! Or, change dnf.conf to comment out installonlypkgs completely:
#installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules
And now dnf update works fine.
So something in dnf is getting confused with regards to the kernel and installonlypkgs even when installonlypkgs is set to packages that aren't even relevant to this system. It's like my dnf.conf installonlypkgs setting is overriding some default list of installonlypkgs? One would think my installonlypkgs setting would *add* to whatever packages the system deems install-only (like kernels).
This seems related to the problem I've had with yum and dnf on my -PAE boxes for years documented in this bug #1199715 that no one has ever looked at.
All my boxes get yum (soon dnf) upgraded (dist-sync) from version to version every few months. Perhaps this is the key that causing some sort of install-only-kernel confusion.
Version-Release number of selected component (if applicable):
dnf-1.1.5-1.fc22.noarch
kernel-4.2.8-200.fc22.i686
How reproducible:
Always
Steps to Reproduce:
1. set line in dnf.conf
2. installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules
3. dnf update
Actual results:
Error: The operation would result in removing the booted kernel: kernel-core-4.2.8-200.fc22.i686.
Expected results:
[updates as expected, new kernel gets installed, not updated]

(In reply to Steve from comment #1)
...
> The default list appears to be configured here:
...
Dnf is implemented in Python, so you can see the default list in your installed system:
$ grep -n kernel /usr/lib/python*/site-packages/dnf/const.py

I'm pretty sure yum didn't behave that way, as I never had this problem with yum (and I may be wrong but dnf is supposed to try to emulate yum behaviour as much as possible?).
I guess we'll leave this bug open as a documentation bug? Or should the behaviour be changed back to the old yum way?
Also, if you get a chance to check my bug #1199715 that would be great too! Ahh! Looks like it's the same source code setting! That list doesn't include kernel-PAE!! Can you check that bz and see if we can get that fixed now that we know if would be super easy! And why not add kernel-core to that list now too? (3 rpm's per kernel install total.)
Thanks!
I'm shocked I seem to be the only person in the world using kernel-PAE in Fedora for several years...

Hi, Trevor. I'm not a developer, so I was simply providing some additional information found by reading the documentation and grepping the code. In addition to the documentation saying what the default installonlypkgs list contains, the dnf log file should also record the list. In any case, the installed installonly packages can be found with:
$ dnf repoquery --installonly # See: man dnf.plugin.repoquery
> ... dnf is supposed to try to emulate yum behaviour as much as possible?
See: man yum2dnf