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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 548BE159251 for ; Sat, 29 Jun 2024 08:39:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9DBC82BC027; Sat, 29 Jun 2024 08:39:35 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 811532BC021 for ; Sat, 29 Jun 2024 08:39:35 +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 7AA5733E3A9 for ; Sat, 29 Jun 2024 08:39:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 11DAF1D36 for ; Sat, 29 Jun 2024 08:39:33 +0000 (UTC) From: "Andrew 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, "Andrew Ammerlaan" Message-ID: <1719650180.594a6613a4693a590ba8473a99ce1fd6c4d506d2.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/linux-mod-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 594a6613a4693a590ba8473a99ce1fd6c4d506d2 X-VCS-Branch: master Date: Sat, 29 Jun 2024 08:39:33 +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: 7898271d-944d-4f47-a482-bc229c74f88b X-Archives-Hash: 385d02affbb80ca994ddbbaeaa43dde7 commit: 594a6613a4693a590ba8473a99ce1fd6c4d506d2 Author: Andrew Ammerlaan gentoo org> AuthorDate: Tue Jun 25 14:15:05 2024 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Sat Jun 29 08:36:20 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=594a6613 linux-mod-r1.eclass: check /boot if we are re-installing dist-kernel Previous commit already adds the check when we call dist-kernel_reinstall_initramfs, but lets do it a bit earlier as well. As in dist-kernel-utils.eclass, make the check nonfatal because when users notice the problem they can correct it and manually re-install the kernel via emerge --config ... We don't have a pkg_pretend phase in this eclass, so we use the pkg_setup phase instead to avoid introducing a new phase here. Signed-off-by: Andrew Ammerlaan gentoo.org> eclass/linux-mod-r1.eclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass index 43c5a7d7b140..9911a6ddee12 100644 --- a/eclass/linux-mod-r1.eclass +++ b/eclass/linux-mod-r1.eclass @@ -132,6 +132,7 @@ IDEPEND=" " if [[ ${MODULES_INITRAMFS_IUSE} ]]; then + inherit mount-boot-utils IUSE+=" ${MODULES_INITRAMFS_IUSE}" IDEPEND+=" ${MODULES_INITRAMFS_IUSE#+}? ( @@ -328,9 +329,19 @@ fi # 3. perform various sanity checks to fail early on issues linux-mod-r1_pkg_setup() { debug-print-function ${FUNCNAME[0]} "${@}" - [[ ${MERGE_TYPE} != binary ]] || return 0 _MODULES_GLOBAL[ran:pkg_setup]=1 _modules_check_function ${#} 0 0 || return 0 + + if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] && + use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+} + then + # Check, but don't die because we can fix the problem and then + # emerge --config ... to re-run installation. + nonfatal mount-boot_check_status + fi + + [[ ${MERGE_TYPE} != binary ]] || return 0 + _modules_check_migration _modules_prepare_kernel