diff options
author | Alexey Neyman <stilor@att.net> | 2017-02-27 22:55:57 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-02-27 22:55:57 -0800 |
commit | 439cab379e169f505494376f55f1438d12de94fa (patch) | |
tree | 61ea3d9d2ebc26870adc22b3e9756ab1cc13e801 /scripts/functions | |
parent | 1ec5e7aa3400b534264ba1c2fa3949dc6a2cca90 (diff) | |
download | crosstool-ng-439cab379e169f505494376f55f1438d12de94fa.tar.gz crosstool-ng-439cab379e169f505494376f55f1438d12de94fa.tar.bz2 crosstool-ng-439cab379e169f505494376f55f1438d12de94fa.zip |
Require xz to be present
Some software starts to adopt xz-only distribution (strace,
gcc-linaro, ...). Better that than deal with cryptic errors like
"cannot find strace-.tar.bz2".
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/scripts/functions b/scripts/functions index eaa1a2bd..723064c1 100644 --- a/scripts/functions +++ b/scripts/functions @@ -618,13 +618,8 @@ CT_SetLibPath() { # Build up the list of allowed tarball extensions # Add them in the prefered order; most preferred comes first CT_DoListTarballExt() { - if [ "${CT_CONFIGURE_has_xz}" = "y" ]; then - printf ".tar.xz\n" - fi - if [ "${CT_CONFIGURE_has_lzma}" = "y" \ - -o "${CT_CONFIGURE_has_xz}" = "y" ]; then - printf ".tar.lzma\n" - fi + printf ".tar.xz\n" + printf ".tar.lzma\n" printf ".tar.bz2\n" printf ".tar.gz\n.tgz\n" printf ".tar\n" @@ -1085,7 +1080,6 @@ CT_Extract() { local nochdir="$1" local basename local ext - local lzma_prog local -a tar_opts if [ "${nochdir}" = "nochdir" ]; then @@ -1128,19 +1122,9 @@ CT_Extract() { tar_opts+=( "-C" "${basename}" ) tar_opts+=( "-xv" ) - # One note here: - # - lzma can be handled either with 'xz' or 'lzma' - # - we get lzma tarball only if either or both are available - # - 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 -fdc" - else - lzma_prog="xz -fdc" - fi case "${ext}" in .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.lzma) xz -fdc "${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}";; |