Browse Source

fast-build mode: use termux_download function for downloading 'Release'

Addition for cada4be0d8.

Release file may not exist too when metadata generation is in progress,
so we may need to do several tries to download file.
emacs-27
Leonid Plyushch 6 years ago
parent
commit
50c42cd530
  1. 3
      scripts/build/termux_get_repo_files.sh

3
scripts/build/termux_get_repo_files.sh

@ -21,8 +21,7 @@ termux_get_repo_files() {
local TERMUX_REPO_NAME=$(echo ${TERMUX_REPO_URL[$idx-1]} | sed -e 's%https://%%g' -e 's%http://%%g' -e 's%/%-%g')
local RELEASE_FILE=${TERMUX_COMMON_CACHEDIR}/${TERMUX_REPO_NAME}-${TERMUX_REPO_DISTRIBUTION[$idx-1]}-Release
curl --fail -L "${TERMUX_REPO_URL[$idx-1]}/dists/${TERMUX_REPO_DISTRIBUTION[$idx-1]}/Release" -o $RELEASE_FILE \
|| termux_error_exit "Download of InRelease and Release.gpg from ${TERMUX_REPO_URL[$idx-1]}/dists/${TERMUX_REPO_DISTRIBUTION[$idx-1]} failed"
termux_download "${TERMUX_REPO_URL[$idx-1]}/dists/${TERMUX_REPO_DISTRIBUTION[$idx-1]}/Release" $RELEASE_FILE "SKIP_CHECKSUM"
for arch in all $TERMUX_ARCH; do
local PACKAGES_HASH=$(./scripts/get_hash_from_file.py ${RELEASE_FILE} $arch ${TERMUX_REPO_COMPONENT[$idx-1]})

Loading…
Cancel
Save