This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1 of 1] scripts/functions: tar: use -J or --lzma instead of --use-compress-program


# HG changeset patch
# User Titus von Boxberg <titus@v9g.de>
# Date 1321536971 -3600
# Node ID fc86fec6decf00a6162a825de384af2e4edfdc5b
# Parent  3c1a3fc051cb46d1bad9cbe2a601c5c4aa48876c
scripts/functions: tar: use -J or --lzma instead of --use-compress-program

The former works portably, the latter not.

Signed-off-by: titus@v9g.de

diff -r 3c1a3fc051cb -r fc86fec6decf scripts/functions
--- a/scripts/functions	Thu Nov 17 14:18:44 2011 +0100
+++ b/scripts/functions	Thu Nov 17 14:36:11 2011 +0100
@@ -712,7 +712,7 @@
     local nochdir="$1"
     local basename
     local ext
-    local lzma_prog
+    local lzma_opt
     local -a tar_opts
 
     if [ "${nochdir}" = "nochdir" ]; then
@@ -761,13 +761,13 @@
     # - 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_opt=--lzma
     else
-        lzma_prog=xz
+        lzma_opt=-J
     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.xz)      CT_DoExecLog FILE tar "${tar_opts[@]}" -J -f "${full_file}";;
+        .tar.lzma)    CT_DoExecLog FILE tar "${tar_opts[@]}" ${lzma_opt} -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)         CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]