From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B5C5015812D for ; Mon, 06 Jan 2025 14:37:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AFFA1E07A5; Mon, 06 Jan 2025 14:37:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 949B5E07A5 for ; Mon, 06 Jan 2025 14:37:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A73DB33BE12 for ; Mon, 06 Jan 2025 14:37:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3EB77190F for ; Mon, 06 Jan 2025 14:37:55 +0000 (UTC) From: "Nowa Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nowa Ammerlaan" Message-ID: <1736174269.65594d38630d5406918d60ebd6d2aba7367aad6b.nowa@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/kernel-install.eclass X-VCS-Directories: eclass/ X-VCS-Committer: nowa X-VCS-Committer-Name: Nowa Ammerlaan X-VCS-Revision: 65594d38630d5406918d60ebd6d2aba7367aad6b X-VCS-Branch: master Date: Mon, 06 Jan 2025 14:37:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c42565e6-755b-47d8-827d-a76edee79d64 X-Archives-Hash: a1c0fffd8b18fe2431f5904a65134a2b commit: 65594d38630d5406918d60ebd6d2aba7367aad6b Author: Nowa Ammerlaan gentoo org> AuthorDate: Mon Jan 6 09:20:31 2025 +0000 Commit: Nowa Ammerlaan gentoo org> CommitDate: Mon Jan 6 14:37:49 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65594d38 kernel-install.eclass: only remove initrd,uki.efi if src dir still exists Closes: https://bugs.gentoo.org/947359 Signed-off-by: Nowa Ammerlaan gentoo.org> eclass/kernel-install.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 6ca39e551110..f70556ad41f5 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -738,9 +738,9 @@ kernel-install_pkg_postinst() { kernel-install_pkg_postrm() { debug-print-function ${FUNCNAME} "$@" - if [[ ! ${KERNEL_IUSE_GENERIC_UKI} ]]; then - local kernel_dir=${EROOT}/usr/src/linux-${KV_FULL} - local image_path=$(dist-kernel_get_image_path) + local kernel_dir=${EROOT}/usr/src/linux-${KV_FULL} + local image_path=$(dist-kernel_get_image_path) + if [[ ! ${KERNEL_IUSE_GENERIC_UKI} && -d ${kernel_dir} ]]; then ebegin "Removing initramfs" rm -f "${kernel_dir}/${image_path%/*}"/{initrd,uki.efi} && find "${kernel_dir}" -depth -type d -empty -delete