From cfae62080565cc5100834906a5e9994e094335f4 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 29 Mar 2014 20:47:11 -0400 Subject: make missing compression binaries a non-fatal warning Fallback on no compression at all, since we don't want to make potentially poor assumptions about what the kernel might support. Fixes FS#39659. --- mkinitcpio | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mkinitcpio b/mkinitcpio index 42abde7..01fe8ba 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -196,9 +196,16 @@ build_image() { local out=$1 compress=$2 errmsg= local -a pipesave cpio_opts - msg "Creating $compress initcpio image: %s" "$out" + if [[ $compress = cat ]]; then + msg "Creating uncompressed initcpio image: %s" "$out" + else + msg "Creating %s-compressed initcpio image: %s" "$compress" "$out" + fi case $compress in + cat) + unset COMPRESSION_OPTIONS + ;; xz) COMPRESSION_OPTIONS+=' --check=crc32' ;; @@ -460,7 +467,8 @@ if [[ $_optgenimg ]]; then _optcompress=${_optcompress:-${COMPRESSION:-gzip}} if ! type -P "$_optcompress" >/dev/null; then - die "Unable to locate compression method: %s" "$_optcompress" + warning "Unable to locate compression method: %s" "$_optcompress" + _optcompress=cat fi msg "Starting build: %s" "$KERNELVERSION" -- cgit v1.2.3-24-g4f1b