From c6609b4739bf45f76360f40c3be2f2b235f728bd Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 3 Oct 2018 09:23:16 +0000 Subject: move logic of curl's http range error to abuild-fetch Move the logic of deleting partial downloads to abuild-fetch, which knows if it is curl or wget that was executed. --- abuild.in | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'abuild.in') diff --git a/abuild.in b/abuild.in index 8f2af25..d52c0bf 100644 --- a/abuild.in +++ b/abuild.in @@ -332,20 +332,9 @@ sourcecheck() { uri_fetch() { local uri="$1" - local status=0 mkdir -p "$SRCDEST" msg "Fetching $uri" - abuild-fetch -d "$SRCDEST" "$uri" || status=$? - - # try again when server does not support resume - if [ "$status" -eq 33 ] && command -v curl > /dev/null; then - local partfile="$SRCDEST/$(filename_from_uri $uri).part" - msg "Removing partial download and trying again: $partfile" - rm "$partfile" - uri_fetch "$uri" - else - return $status - fi + abuild-fetch -d "$SRCDEST" "$uri" } is_remote() { -- cgit v1.2.3-60-g2f50