index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2023-07-01 10:32:11 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2023-07-01 10:32:11 +0200 |
commit | 6924d3996cd9b22e0ff81b4c53e0aedc64997a16 (patch) | |
tree | b83dce0886f1c0a07e0852f6f3aa9b52b601b2c4 | |
parent | 76a83eb27ba0ad0a628f477b743da736716f3ba6 (diff) |
-rwxr-xr-x | lib/common-functions | 15 |
diff --git a/lib/common-functions b/lib/common-functions index b1a39e3..58b1080 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -464,14 +464,23 @@ extract_source_directory() { local mod_revision="$4" local output="$5" local sub_pkgrel="$6" - + local res + local tmptarfile + local pkgtarfile if [ -n "${revision}" ] \ && [ "${revision}" != '0000000000000000000000000000000000000000' ]; then local pkgbase_translated pkgbase_translated=$(gitlab_project_name_to_path "${pkgbase}") - curl -LSs "https://buildmaster.archlinux32.org/upstream-packages/${pkgbase_translated}-${revision}.tar.gz" \ - | tar -xz --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" + tmptarfile=$(mktemp 'tmp.upstream-package.XXXXXXXXXX') + pkgtarfile="${tmp_dir}/${tmptarfile}" + curl -o "$pkgtarfile" -fLSs "https://buildmaster.archlinux32.org/upstream-packages/${pkgbase_translated}-${revision}.tar.gz" + res=$? + if [ "$res" -ne 0 ]; then + >&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" fi |