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:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-23 13:38:15 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-23 13:38:15 +0200
commitf54d2c02d5327a91e7a10f15f9221bb2a1841d9d (patch)
treec1575a1766aa3c71794e82f939e8ae7fd30ce9e5 /lib/common-functions
parent8ab642824755b58abb8390f38a475cba05fd5e07 (diff)
Revert "extract_source_directory(): remove pkgbase transcription"
This reverts commit 8ab642824755b58abb8390f38a475cba05fd5e07. apparently, upstream did *not* rename their repos, just our cache does not see, that it's broken ...
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/common-functions b/lib/common-functions
index e6b43a5..4000336 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -457,8 +457,16 @@ extract_source_directory() {
if [ -n "${revision}" ] \
&& [ "${revision}" != '0000000000000000000000000000000000000000' ]; then
- curl -LSs "https://buildmaster.archlinux32.org/upstream-packages/${pkgbase}-${revision}.tar.gz" \
- | tar -xz --strip-components=1 -C "${output}" -- "${pkgbase}-${revision}"
+ local pkgbase_translated
+ for substitution in '' 's@+@plus@g' 's@+@-@g'; do
+ pkgbase_translated=$(
+ printf '%s\n' "${pkgbase}" \
+ | sed "${substitution}"
+ )
+ curl -LSs "https://buildmaster.archlinux32.org/upstream-packages/${pkgbase_translated}-${revision}.tar.gz" \
+ | tar -xz --strip-components=1 -C "${output}" -- "${pkgbase_translated}-${revision}" 2>/dev/null \
+ && break
+ done
if [ ! -f "${output}/PKGBUILD" ]; then
>&2 printf 'failed to download/extract a PKGBUILD from upstream archlinux for %s %s\n' \
"${pkgbase}" "${revision}"