Merge "Revert "Use rpm -e instead of dnf for cleaning old kernels""
This commit is contained in:
commit
b713c7fe6c
@ -18,7 +18,7 @@ if [[ ${YUM} == "dnf" ]]; then
|
|||||||
# http://dnf.readthedocs.org/en/latest/cli_vs_yum.html
|
# http://dnf.readthedocs.org/en/latest/cli_vs_yum.html
|
||||||
_old_kernels="$(dnf repoquery --installonly --latest-limit=-1 -q)"
|
_old_kernels="$(dnf repoquery --installonly --latest-limit=-1 -q)"
|
||||||
if [[ -n "${_old_kernels}" ]]; then
|
if [[ -n "${_old_kernels}" ]]; then
|
||||||
rpm -e ${_old_kernels}
|
dnf remove -y --setopt=protect_running_kernel=False ${_old_kernels}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
install-packages yum-utils
|
install-packages yum-utils
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
fixes:
|
|
||||||
- |
|
|
||||||
Fixed an issue where cleaning old kernels on systems runing ``dnf`` would
|
|
||||||
fail in case the kernel packages being removed matches the running kernel
|
|
||||||
of the system building the image. See Bug: `1623409
|
|
||||||
<https://bugs.launchpad.net/diskimage-builder/+bug/1623409>`_.
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user