Merge pull request #620 from stilor/require-xz

Require xz to be present
This commit is contained in:
Alexey Neyman 2017-02-28 08:41:12 -08:00 committed by GitHub
commit ed7e671013
3 changed files with 4 additions and 38 deletions

View File

@ -11,66 +11,55 @@ choice
config STRACE_V_4_16 config STRACE_V_4_16
bool bool
prompt "4.16" prompt "4.16"
depends on CONFIGURE_has_xz
config STRACE_V_4_15 config STRACE_V_4_15
bool bool
prompt "4.15" prompt "4.15"
depends on CONFIGURE_has_xz
config STRACE_V_4_14 config STRACE_V_4_14
bool bool
prompt "4.14 (OBSOLETE)" prompt "4.14 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_13 config STRACE_V_4_13
bool bool
prompt "4.13 (OBSOLETE)" prompt "4.13 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_12 config STRACE_V_4_12
bool bool
prompt "4.12 (OBSOLETE)" prompt "4.12 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_11 config STRACE_V_4_11
bool bool
prompt "4.11 (OBSOLETE)" prompt "4.11 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_10 config STRACE_V_4_10
bool bool
prompt "4.10 (OBSOLETE)" prompt "4.10 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_9 config STRACE_V_4_9
bool bool
prompt "4.9 (OBSOLETE)" prompt "4.9 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_8 config STRACE_V_4_8
bool bool
prompt "4.8 (OBSOLETE)" prompt "4.8 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_7 config STRACE_V_4_7
bool bool
prompt "4.7 (OBSOLETE)" prompt "4.7 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_6 config STRACE_V_4_6
bool bool
prompt "4.6 (OBSOLETE)" prompt "4.6 (OBSOLETE)"
depends on OBSOLETE depends on OBSOLETE
depends on CONFIGURE_has_xz
config STRACE_V_4_5_20 config STRACE_V_4_5_20
bool bool

View File

@ -214,6 +214,7 @@ ACX_CHECK_PROGS_REQ([readlink], [readlink])
ACX_CHECK_PROGS_REQ([tar], [tar]) ACX_CHECK_PROGS_REQ([tar], [tar])
ACX_CHECK_PROGS_REQ([gzip], [gzip]) ACX_CHECK_PROGS_REQ([gzip], [gzip])
ACX_CHECK_PROGS_REQ([bzip2], [bzip2]) ACX_CHECK_PROGS_REQ([bzip2], [bzip2])
ACX_CHECK_PROGS_REQ([xz], [xz])
ACX_CHECK_PROGS_REQ([help2man], [help2man]) ACX_CHECK_PROGS_REQ([help2man], [help2man])
# Not a fatal failure even if we have neither - the tarballs may # Not a fatal failure even if we have neither - the tarballs may
@ -347,14 +348,6 @@ AC_SUBST([GPERF_LEN_TYPE])
#-------------------------------------------------------------------- #--------------------------------------------------------------------
AC_SUBST([kconfig_options]) AC_SUBST([kconfig_options])
#----------------------------------------
AC_CHECK_PROGS([xz], [xz])
ACX_SET_KCONFIG_OPTION([xz])
AS_IF(
[test -z "$xz"],
[AC_CHECK_PROGS([lzma], [lzma])])
ACX_SET_KCONFIG_OPTION([lzma])
#---------------------------------------- #----------------------------------------
AC_CHECK_PROGS([cvs], [cvs]) AC_CHECK_PROGS([cvs], [cvs])
ACX_SET_KCONFIG_OPTION([cvs]) ACX_SET_KCONFIG_OPTION([cvs])

View File

@ -618,13 +618,8 @@ CT_SetLibPath() {
# Build up the list of allowed tarball extensions # Build up the list of allowed tarball extensions
# Add them in the prefered order; most preferred comes first # Add them in the prefered order; most preferred comes first
CT_DoListTarballExt() { CT_DoListTarballExt() {
if [ "${CT_CONFIGURE_has_xz}" = "y" ]; then printf ".tar.xz\n"
printf ".tar.xz\n" printf ".tar.lzma\n"
fi
if [ "${CT_CONFIGURE_has_lzma}" = "y" \
-o "${CT_CONFIGURE_has_xz}" = "y" ]; then
printf ".tar.lzma\n"
fi
printf ".tar.bz2\n" printf ".tar.bz2\n"
printf ".tar.gz\n.tgz\n" printf ".tar.gz\n.tgz\n"
printf ".tar\n" printf ".tar\n"
@ -1085,7 +1080,6 @@ CT_Extract() {
local nochdir="$1" local nochdir="$1"
local basename local basename
local ext local ext
local lzma_prog
local -a tar_opts local -a tar_opts
if [ "${nochdir}" = "nochdir" ]; then if [ "${nochdir}" = "nochdir" ]; then
@ -1128,19 +1122,9 @@ CT_Extract() {
tar_opts+=( "-C" "${basename}" ) tar_opts+=( "-C" "${basename}" )
tar_opts+=( "-xv" ) 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 case "${ext}" in
.tar.xz) xz -fdc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;; .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.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.gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
.tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";; .tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;