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 83FF9158020 for ; Tue, 11 Oct 2022 22:56:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A69C0E090F; Tue, 11 Oct 2022 22:55:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 6DC6CE0908 for ; Tue, 11 Oct 2022 22:55:11 +0000 (UTC) From: Sam James To: gentoo-dev@lists.gentoo.org Cc: dist-kernel@gentoo.org, kernel@gentoo.org, Sam James Subject: [gentoo-dev] [PATCH 4/8] linux-mod.eclass: improve error handling for module compression Date: Tue, 11 Oct 2022 23:54:40 +0100 Message-Id: <20221011225444.56032-4-sam@gentoo.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221011225444.56032-1-sam@gentoo.org> References: <20221011225444.56032-1-sam@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: a95dc37b-da5d-4688-901c-56c24774fccf X-Archives-Hash: ab92014fcf57752622f09fb51ac28f95 doins will 'die for us' in newer EAPIs, and add missing || dies to compressor calls. Signed-off-by: Sam James --- eclass/linux-mod.eclass | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index e837916b881a..e4c71cdf2c15 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -716,22 +716,22 @@ linux-mod_src_install() { # and similarily compress the module being built if != NONE. if linux_chkconfig_present MODULE_COMPRESS_XZ; then - xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ} - doins ${modulename}.${KV_OBJ}.xz || die "doins ${modulename}.${KV_OBJ}.xz failed" + xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz failed" + doins ${modulename}.${KV_OBJ}.xz elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then if type -P pigz ; then - pigz -n$(makeopts_jobs) ${modulename}.${KV_OBJ} + pigz -n$(makeopts_jobs) ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with pigz failed" else - gzip ${modulename}.${KV_OBJ} + gzip ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with gzip failed" fi - doins ${modulename}.${KV_OBJ}.gz || die "doins ${modulename}.${KV_OBJ}.gz failed" + doins ${modulename}.${KV_OBJ}.gz elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then - zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ} - doins ${modulename}.${KV_OBJ}.zst || die "doins ${modulename}.${KV_OBJ}.zst failed" + zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ} || "Compressing ${modulename}.${KV_OBJ} with zstd failed" + doins ${modulename}.${KV_OBJ}.zst else - doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" + doins ${modulename}.${KV_OBJ} fi - cd "${OLDPWD}" + cd "${OLDPWD}" || die "${OLDPWD} does not exist" generate_modulesd "${objdir}/${modulename}" done -- 2.38.0