Add sanity check for LTS Kernel

This commit is contained in:
Patrick Vogelaar 2022-10-27 22:08:39 +02:00
parent 5c4a9a58c8
commit 1b09c385fb
1 changed files with 9 additions and 1 deletions

View File

@ -22,12 +22,20 @@ python check_coreos_sanity_eventhandler() {
"systemd is not set as `INIT_MANAGER`. "
"Using SystemD is mandatory on CoreOS based distribution"
)
if e.data.getVar("TCLIBC") != "glibc":
bb.fatal(
"glibc is not set as `TCLIBC`. "
"Using glibc is mandatory on CoreOS based distribution"
)
virtKernel = e.data.getVar('PREFERRED_PROVIDER_virtual/kernel')
if "lts" not in virtKernel:
bb.warn(
"No LTS Linux Kernel used. "
"It is highly recommended to use a LTS version. "
"Currently used provider is: %s_%s" % (virtKernel, e.data.getVar('PREFERRED_VERSION_' + virtKernel))
)
return
}