Commit 06a681ca authored by Florian Pritz's avatar Florian Pritz Committed by Pierre Schmitz
Browse files

commitpkg: use absolute paths when uploading files



This fixes a problem where rsync won't work if the pkgver contains a
colon (epoch). In this case rsync assumes that the colon is a
remote:path separator and having src and dest both being remote
arguments is not supported.

Signed-off-by: default avatarFlorian Pritz <bluewind@xinu.at>
Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent b763788b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -168,6 +168,16 @@ for _arch in ${arch[@]}; do
done
archrelease "${commit_arches[@]/#/$repo-}" || die

new_uploads=()

# convert to absolute paths so rsync can work with colons (epoch)
while read -r -d '' upload; do
	  new_uploads+=("$upload")
done < <(realpath -z "${uploads[@]}")

uploads=("${new_uploads[@]}")
unset new_uploads

if [[ ${#uploads[*]} -gt 0 ]]; then
	msg 'Uploading all package and signature files'
	rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die