From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 finch.gentoo.org (Postfix) with ESMTPS id 11CE61582EF for ; Mon, 03 Mar 2025 17:48:00 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 007983431A8 for ; Mon, 03 Mar 2025 17:48:00 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 38B411102D2; Mon, 03 Mar 2025 17:47:56 +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 bobolink.gentoo.org (Postfix) with ESMTPS id 2EF1C1102D2 for ; Mon, 03 Mar 2025 17:47:56 +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 D26003431B3 for ; Mon, 03 Mar 2025 17:47:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6CA98280E for ; Mon, 03 Mar 2025 17:47:54 +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: <1741023955.4a0f408ed58c36002ded30e0b0b702ecf5d147e4.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: 4a0f408ed58c36002ded30e0b0b702ecf5d147e4 X-VCS-Branch: master Date: Mon, 03 Mar 2025 17:47:54 +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: 6ada7747-95d1-4970-813f-94730e936548 X-Archives-Hash: b9e4d672f8a1355e708515280dfecdf6 commit: 4a0f408ed58c36002ded30e0b0b702ecf5d147e4 Author: Nowa Ammerlaan gentoo org> AuthorDate: Sun Mar 2 08:58:22 2025 +0000 Commit: Nowa Ammerlaan gentoo org> CommitDate: Mon Mar 3 17:45:55 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0f408e kernel-install.eclass: cleanup dead symlinks after removal Since we remove /usr/src/linux-KV_FULL but by design keep the /lib/modules/KV_FULL, we end up with some dead symlinks after depcleaning a dist-kernel. This has the unfortunate side effect of tricking systemd's kernel-install into thinking that a kernel image for this kernel still exists. Which leads to some ugliness further down the line. We can easily resolve the problem by cleaning up these dead symlinks. Signed-off-by: Nowa Ammerlaan gentoo.org> eclass/kernel-install.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index cf34007844a8..67143278f368 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -808,6 +808,9 @@ kernel-install_pkg_postrm() { find "${kernel_dir}" -depth -type d -empty -delete eend ${?} fi + + # Clean up dead symlinks + find -L "${EROOT}/lib/modules/${KV_FULL}" -type l -delete } # @FUNCTION: kernel-install_pkg_config