My OS is RHEL8.
I have custom rpm files stored on a yum repo. I am trying to update a release rpm I create, using sudo yum update --installroot=/backup my_release (with and without installroot), but the kernel package doesn't even get listed as an attempted install, while it is in the dependency list and appears in sudo yum update.
The general format of the package hierarchy is as follows:
yum repoquery --deplist my_release -> Shows a bunch of upper-level packages for my software subcomponents, one of which is my_patches.
yum repoquery --deplist my_patches -> Shows many packages, the relevant ones being:
dependency: kernel = 4.18.0-477.10.1.el8_8
provider: kernel-core-4.18.0-477.10.1.el8_8.x86_64
provider: kernel-4.18.0-477.10.1.el8_8.x86_64
dependency: kernel-tools = 4.18.0-477.10.1.el8_8
provider: kernel-tools-4.18.0-477.10.1.el8_8.x86_64
dependency: kernel-tools-libs = 4.18.0-477.10.1.el8_8
provider: kernel-tools-libs-4.18.0-477.10.1.el8_8.x86_64
The command I am trying to run is sudo yum --installroot=/backup update my_release. I have also tried sudo yum --installroot=/backup update my_patches and those same ones without --installroot. Relevant output is below:
Dependencies resolved.
==========================================================================================================================
Package Architecture Version Repository Size
==========================================================================================================================
Upgrading:
...
my_patches noarch 4.1-4 MY_Repo 7.1 k
...
my_release noarch 11.1-6 MY_Repo 15 k
...
kernel-tools x86_64 4.18.0-477.10.1.el8_8 MY_Repo 9.6 M
kernel-tools-libs x86_64 4.18.0-477.10.1.el8_8 MY_Repo 9.4 M
...
Installing dependencies:
kernel-core x86_64 4.18.0-477.10.1.el8_8 MY_Repo 42 M
kernel-modules x86_64 4.18.0-477.10.1.el8_8 MY_Repo 34 M
Transaction Summary
==========================================================================================================================
Install 2 Packages
Upgrade 18 Packages
Total download size: 113 M
However, when I run sudo yum update, or sudo yum --installroot=/backup update, I get the following:
Dependencies resolved.
==========================================================================================================================
Package Architecture Version Repository Size
==========================================================================================================================
Installing:
kernel x86_64 4.18.0-477.10.1.el8_8 MY_Repo 9.4 M
Upgrading:
...
my_patches noarch 4.1-4 MY_Repo 7.1 k
...
my_release noarch 11.1-6 MY_Repo 15 k
...
kernel-tools x86_64 4.18.0-477.10.1.el8_8 MY_Repo 9.6 M
kernel-tools-libs x86_64 4.18.0-477.10.1.el8_8 MY_Repo 9.4 M
...
Installing dependencies:
kernel-core x86_64 4.18.0-477.10.1.el8_8 MY_Repo 42 M
kernel-modules x86_64 4.18.0-477.10.1.el8_8 MY_Repo 34 M
Transaction Summary
==========================================================================================================================
Install 3 Packages
Upgrade 18 Packages
Total download size: 123 M
Why isn't kernel installing in the my_release command? I think it's effectively installed, since kernel-core and kernel-modules are there, but for some reason it's just ignoring kernel. I know I can just run sudo yum update, but for scripting/security purposes, I need to maintain that yum only updates the release rpm. Furthermore, the update isn't failing, despite kernel being a dependency as shown above. Additionally, when I run uname -r in the corresponding partition after cutting over, it does in fact show the new kernel, it just doesn't "think" it's installed via rpm -q kernel and yum list installed, both still showing the old kernel. I have also tried using the --disableexcludes=all flag just in case kernels were being excluded.
I believe it may be possible that yum's dependency resolution is doing something weird about how kernel is "provided" by kernel-core, but I don't know why it still wouldn't install the package at all or why no one else would have noticed this issue by now. If this is the case, and if anyone knows how to force it to install without a separate command, that would be ideal. Any help would be appreciated.
EDIT:
It's also worth noting that installing the kernel rpm with rpm --root /backup -Up kernel-4.18.0-477.10.1.el8_8.x86_64.rpm works as expected, and I believe -ip works as well, for anyone concerned about the kernel getting overwritten.