Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/common-functions
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-07-02 19:22:43 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-07-02 19:22:43 +0200
commitc9d63b387c6124bdcd029251118b3d1e0c88a031 (patch)
treeeb0e1b169bfeb9baa20154c02337d10af5568501 /lib/common-functions
parent8cd34b628cdb21708fe79524c8b64c77a0984bb7 (diff)
make upstream package download non-fatal (for instance for build-support packages with a complete PKGBUILD
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions10
1 files 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}" ] \