From 29aabba0ea759c6a2864ff5631735b67ee38e5e0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 5 Feb 2020 18:44:56 +0000 Subject: gentoo resync : 05.02.2020 --- eclass/kernel-install.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'eclass/kernel-install.eclass') diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 7e64f44c8c33..1fdeb1bf4dc7 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -302,7 +302,13 @@ kernel-install_pkg_prerm() { kernel-install_pkg_postrm() { debug-print-function ${FUNCNAME} "${@}" - # (no-op at the moment) + if [[ -z ${ROOT} ]] && use initramfs; then + local image_path=$(kernel-install_get_image_path) + ebegin "Removing initramfs" + rm -f "${EROOT}/usr/src/linux-${PV}/${image_path%/*}/initrd" && + find "${EROOT}/usr/src/linux-${PV}" -depth -type d -empty -delete + eend ${?} + fi } _KERNEL_INSTALL_ECLASS=1 -- cgit v1.2.3