summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-10-11 14:13:41 +0200
committerDave Reisner <dreisner@archlinux.org>2013-10-21 14:34:23 +0200
commit95b2c16f44f02ac264686651cf1aa207c65cb93a (patch)
tree5807128362a4de09fe5a0685f9682606c52c8912
parent344c27a8b56a4aa8bd168f98285165c3fc87cba3 (diff)
downloadmkinitcpio-95b2c16f44f02ac264686651cf1aa207c65cb93a.tar.gz
mkinitcpio-95b2c16f44f02ac264686651cf1aa207c65cb93a.tar.xz
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 <dreisner@archlinux.org>
-rwxr-xr-xlsinitcpio6
1 files 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: