Make sure, the realtime element removes the default kernel

Since the default kernel is a protected package, removing it, even in
the chroot environment, may fail. This fix forces the removal by
disabling the protected_packages configuration.

Change-Id: Ib7c849cf6aa2b1716cfddfe6e852dae482e00301
This commit is contained in:
Sven Anderson 2018-01-18 18:52:55 +01:00
parent 02d0985c1e
commit 11462cc35f
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -eux
# Uninstalling the default kernel in chroot might fail, if it is the same
# kernel that runs in the host. Therefore we are forcing it here by
# disabling the protected_packages config.
# The machine suffix is required to not accidentally remove the
# kernel-rt again in case the default kernel is not installed.
yum -v -y --setopt=protected_packages= erase kernel.$(uname -m)

View File

@ -1,5 +1,3 @@
kernel-rt:
kernel-rt-kvm:
tuned-profiles-nfv-host:
kernel:
uninstall: True