build-package.sh: retry if metadata signature is bad
Do not fail immediately if signature is bad. This often happens when metadata has been downloaded during repository update. Usually signature becomes fixed in a few seconds, so we can rather wait than abort build immediately.
This commit is contained in:
parent
90c2f91830
commit
f219100650
@ -31,7 +31,12 @@ termux_get_repo_files() {
|
||||
"$RELEASE_FILE" SKIP_CHECKSUM && \
|
||||
termux_download "${TERMUX_REPO_URL[$idx-1]}/dists/${TERMUX_REPO_DISTRIBUTION[$idx-1]}/Release.gpg" \
|
||||
"${RELEASE_FILE}.gpg" SKIP_CHECKSUM; then
|
||||
|
||||
if gpg --verify "${RELEASE_FILE}.gpg" "$RELEASE_FILE"; then
|
||||
break
|
||||
else
|
||||
rm "$RELEASE_FILE" "${RELEASE_FILE}.gpg"
|
||||
fi
|
||||
fi
|
||||
|
||||
download_attempts=$((download_attempts - 1))
|
||||
@ -43,8 +48,6 @@ termux_get_repo_files() {
|
||||
sleep 30
|
||||
done
|
||||
|
||||
gpg --verify "${RELEASE_FILE}.gpg" "$RELEASE_FILE"
|
||||
|
||||
for arch in all $TERMUX_ARCH; do
|
||||
local PACKAGES_HASH=$(./scripts/get_hash_from_file.py ${RELEASE_FILE} $arch ${TERMUX_REPO_COMPONENT[$idx-1]})
|
||||
# If packages_hash = "" then the repo probably doesn't contain debs for $arch
|
||||
|
Loading…
x
Reference in New Issue
Block a user