From 95b2c16f44f02ac264686651cf1aa207c65cb93a Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 11 Oct 2013 08:13:41 -0400 Subject: lsinitcpio: separate decompression from archive reading This essentially reverts 306dcbd7b21f8a680 which foolishly assumes that kernel and libarchive decompression support stay in sync. Signed-off-by: Dave Reisner --- lsinitcpio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lsinitcpio b/lsinitcpio index 0c9d05d..10cd663 100755 --- a/lsinitcpio +++ b/lsinitcpio @@ -139,7 +139,7 @@ analyze_image() { fi # decompress the image since we need to read from it multiple times. - bsdtar -C "$workdir" -xf "$_image" || die 'Failed to decompress image' + decomp "$_image" | bsdtar -C "$workdir" -xf - || die 'Failed to decompress image' # collect stats kernver=("$workdir"/usr/lib/modules/*/) @@ -277,10 +277,10 @@ _compress=$(detect_filetype "$_image") || exit if (( _optanalyze )); then analyze_image "$_image" elif (( _optshowconfig )); then - bsdtar xOf "$_image" buildconfig 2>/dev/null || + decomp "$_image" | bsdtar xOf - buildconfig 2>/dev/null || die 'Failed to extract config from image (mkinitcpio too old?)' else - bsdcpio -i --quiet $_optverbose $_list <"$_image" + decomp "$_image" | bsdcpio -i --quiet $_optverbose $_list fi # vim: set ft=sh ts=4 sw=4 et: -- cgit v1.2.3-24-g4f1b