Skip to content

Commit

Permalink
make missing compression binaries a non-fatal warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
falconindy committed Mar 30, 2014
1 parent d90c1fb commit cfae620
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mkinitcpio
Original file line number Diff line number Diff line change
Expand Up @@ -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'
;;
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cfae620

Please sign in to comment.