From 9b9e5c4162e39b63da4783124e844adf2f223f26 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 28 Feb 2019 14:39:08 -0800 Subject: Make lzip an optional dependency Signed-off-by: Alexey Neyman --- scripts/functions | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/functions b/scripts/functions index fecdad2e..09df03af 100644 --- a/scripts/functions +++ b/scripts/functions @@ -669,7 +669,9 @@ CT_DoListTarballExt() { printf ".tar.xz\n" printf ".tar.lzma\n" - printf ".tar.lz\n" + if [ "${CT_CONFIGURE_has_lzip}" = "y" ]; then + printf ".tar.lz\n" + fi printf ".tar.bz2\n" printf ".tar.gz\n.tgz\n" printf ".tar\n" @@ -2074,6 +2076,7 @@ CT_PackageRun() CT_DoFetch() { local tmp_dir + local extensions e a if [ "${src_release}" = "y" ]; then # Some packages do not contain any directory level at all @@ -2083,8 +2086,17 @@ CT_DoFetch() basename="${pkg_name}-${version}" fi pkg_dir="${pkg_name}/${version}" + # Check which extensions we are allowed to fetch + for a in ${archive_formats}; do + for e in $(CT_DoListTarballExt); do + if [ "${a}" = "${e}" ]; then + extensions="${extensions} ${a}" + break + fi + done + done if ! CT_GetFile package="${pkg_name}" pkg_dir="${pkg_dir}" dir_name="${dir_name}" \ - basename="${archive_filename}" extensions="${archive_formats}" \ + basename="${archive_filename}" extensions="${extensions}" \ digest="${CT_VERIFY_DOWNLOAD_DIGEST}" \ signature_format="${CT_VERIFY_DOWNLOAD_SIGNATURE:+${signature_format}}" \ mirrors="${mirrors}"; then -- cgit v1.2.3