From c9d63b387c6124bdcd029251118b3d1e0c88a031 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 2 Jul 2023 19:22:43 +0200 Subject: make upstream package download non-fatal (for instance for build-support packages with a complete PKGBUILD --- lib/common-functions | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/common-functions b/lib/common-functions index 8960b0a..1ab3e72 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -480,9 +480,13 @@ extract_source_directory() { >&2 echo 'Download upstream-package from upstream via buildmaster cache failed. Curl exit code was $res.' return 1 fi - tar -xz -f "${pkgtarfile}" --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" - printf '\n' >> \ - "${output}/PKGBUILD" + if [ -f "${pkgtarfile}" ]; then + tar -xz -f "${pkgtarfile}" --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" + printf '\n' >> \ + "${output}/PKGBUILD" + else + >&2 echo 'No upstream tarfile, assuming the package is a local one and has a full PKGBUILD not a diff-PKGBUILD.' + fi fi if [ -n "${mod_revision}" ] \ -- cgit v1.2.3-54-g00ecf