From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15818 invoked by alias); 22 Nov 2011 09:34:11 -0000 Received: (qmail 15608 invoked by uid 22791); 22 Nov 2011 09:34:08 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail.terralink.de (HELO mail.terralink.de) (217.9.16.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 09:33:47 +0000 Received: from suchoi.alsteraero.com (pd95ba963.dip0.t-ipconnect.de [217.91.169.99]) by mail.terralink.de (Postfix) with ESMTPA id D942D39AB0 for ; Tue, 22 Nov 2011 10:33:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by suchoi.alsteraero.com (Postfix) with ESMTP id 6DEE63AE49CF for ; Tue, 22 Nov 2011 10:33:45 +0100 (CET) Received: from suchoi.alsteraero.com ([127.0.0.1]) by localhost (suchoi.alsteraero-public.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZGhDzAri9vea for ; Tue, 22 Nov 2011 10:33:45 +0100 (CET) Received: from stetschkin.alsteraero.lan (stetschkin.alsteraero.lan [172.23.1.113]) by suchoi.alsteraero.com (Postfix) with ESMTPS id 5F2FC3AE49CA for ; Tue, 22 Nov 2011 10:33:45 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 1 of 1] scripts/functions: extract: portable call for old and defective tars X-Mercurial-Node: ac30f53965908a4341a5cf21ba67d707a8f0d68e Message-Id: In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.9.3 Date: Tue, 22 Nov 2011 09:34:00 -0000 From: Titus von Boxberg To: crossgcc@sourceware.org X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00114.txt.bz2 # HG changeset patch # User Titus von Boxberg # Date 1321952890 -3600 # Node ID ac30f53965908a4341a5cf21ba67d707a8f0d68e # Parent 3c1a3fc051cb46d1bad9cbe2a601c5c4aa48876c scripts/functions: extract: portable call for old and defective tars Instead of using -J, --lzma, --use-compress-program or the like use -dc | tar -f - Signed-off-by: titus@v9g.de diff -r 3c1a3fc051cb -r ac30f5396590 scripts/functions --- a/scripts/functions Thu Nov 17 14:18:44 2011 +0100 +++ b/scripts/functions Tue Nov 22 10:08:10 2011 +0100 @@ -761,15 +761,15 @@ # - so, if we get an lzma tarball, and either 'xz' or 'lzma' is # missing, we can assume the other is available if [ "${CT_CONFIGURE_has_lzma}" = "y" ]; then - lzma_prog=lzma + lzma_prog="lzma -fdc" else - lzma_prog=xz + lzma_prog="xz -fdc" fi case "${ext}" in - .tar.xz) CT_DoExecLog FILE tar "${tar_opts[@]}" --use-compress-program=xz -f "${full_file}";; - .tar.lzma) CT_DoExecLog FILE tar "${tar_opts[@]}" --use-compress-program="${lzma_prog}" -f "${full_file}";; - .tar.bz2) CT_DoExecLog FILE tar "${tar_opts[@]}" -j -f "${full_file}";; - .tar.gz|.tgz) CT_DoExecLog FILE tar "${tar_opts[@]}" -z -f "${full_file}";; + .tar.xz) xz -fdc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;; + .tar.lzma) ${lzma_prog} "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;; + .tar.bz2) bzip2 -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;; + .tar.gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;; .tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";; /.git) CT_ExtractGit "${basename}" "${@}";; *) CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension" -- For unsubscribe information see http://sourceware.org/lists.html#faq