kernel.bbclass has the following lines which creates a softlink for the image being deployed. (For example it's creating a softlink /boot/Image) Because this is now part of the rpm, this fails during dnf upgrade as both the new and old kernel packages will try to install /boot/Image steps to reproduce: boot board then upgrade kernel version, build, do a dnf upgrade by pointing to newly generated rpms. dnf upgrade will fail with error complaining about two packages providing the same file.
Why should it matter if there is a link present. Typically when you upgrade you REPLACE the old kernel with a new one. If this is not happening with a specific upgrade situation -- then we may want to investigate why it is so. The key here is that either we need to support multiple kernels being loaded at the same time, or the package manager usage should be updating them like any other package on the system. Understanding the way you are calling the tools and the results you are getting will better explain if what we are seeing is correct or not. I do know, a common misunderstanding is when someone runs: rpm -i <package> -i says -INSTALL- a new version of the package (not upgrade), this will result in two versions being installed at once, and usually fails in a way like you described. -U is supposed to be used for all upgrades and will remove the older version(s) as part of installing the new one.
The issue is because the link is created at build time and so each kernel package has /boot/Image and theres is a conflict error when running 'dnf upgrade' Fix would be to put the soft link in a postinstall script, will send a rfc patch soon
Working with Bruce on this
fixed with bruce's patch https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=236e36a38e7d222ffdc3608644500b1db6129a1f