summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-11 20:45:45 +0100
committerSam James <sam@gentoo.org>2022-10-13 20:57:53 +0100
commit86ecbb120f0bc4c1c4fc3ae0e31f383474340998 (patch)
tree24441333f51f1687c5daaa6f515d0cb640c09703 /eclass
parentlinux-mod.eclass: use pigz for parallel compression if available (diff)
downloadgentoo-86ecbb120f0bc4c1c4fc3ae0e31f383474340998.tar.gz
gentoo-86ecbb120f0bc4c1c4fc3ae0e31f383474340998.tar.bz2
gentoo-86ecbb120f0bc4c1c4fc3ae0e31f383474340998.zip
linux-mod.eclass: improve error handling for module compression
doins will 'die for us' in newer EAPIs, and add missing || dies to compressor calls. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-mod.eclass18
1 files 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