Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 09:28:22 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 09:28:22 +0200
commitcba24c4c42eaa8be272c0aab448449484b9a2007 (patch)
tree3e378732bf0073f3d583a0071376e7b60a963db0 /lib
parentcab7d89a74c945c72676f66c62bd2d603f344e16 (diff)
extract_source_directory(): fix some bugs:
* rev -> revision * the downloaded tar.gz has actually a folder with the desired content
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 19d608c..02fd36b 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -457,11 +457,11 @@ extract_source_directory() {
local output="$5"
local sub_pkgrel="$6"
- if [ -n "${rev}" ] \
- && [ "${rev}" != '0000000000000000000000000000000000000000' ]; then
+ if [ -n "${revision}" ] \
+ && [ "${revision}" != '0000000000000000000000000000000000000000' ]; then
# TODO: use cache, here
curl -LSs "https://gitlab.archlinux.org/archlinux/packaging/packages/${pkgbase}/-/archive/${revision}/${pkgbase}-${revision}.tar.gz" \
- |tar -xz -C "${output}"
+ |tar -xz --strip-components=1 -C "${output}" -- "${pkgbase}-${revision}"
printf '\n' >> \
"${output}/PKGBUILD"
fi
@@ -490,7 +490,6 @@ extract_source_directory() {
# we don't want write permissions on the PKGBUILD - otherwise pkgver()
# will change the version! (**HACK**)
chmod oga-w "${output}/PKGBUILD"
-
}
# download_sources_by_hash