aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2013-08-31 01:16:24 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2013-08-31 01:16:24 +0000
commitf3a777ce3c991bd350c91e45d9baa191522e294f (patch)
tree38a47c85728d24eafba68fb806d2472942b31c97 /Mk/bsd.port.mk
parent8702575be76b1db9d82b72a17ad84fc8aca725be (diff)
downloadports-f3a777ce3c991bd350c91e45d9baa191522e294f.tar.gz
ports-f3a777ce3c991bd350c91e45d9baa191522e294f.zip
- make checksum: When encountering a checksum mismatch, delete the file
before retrying. The previous behavior would try to download a range of the new bytes and then hit the 'Requested Range Not Satisfiable' error and never actually redownload the file. This fixes cases where a port is rerolled and distinfo updated, but users have a bad distfile sitting there that they would manually need to remove. Reviewed by: bapt Reported by: danfe With hat: portmgr
Notes
Notes: svn path=/head/; revision=325760
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 1642a89ebd5e..3f26568a6be5 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -4769,6 +4769,7 @@ checksum: fetch check-checksum-algorithms
${ECHO_MSG} "=> $$alg Checksum mismatch for $$file."; \
refetchlist="$$refetchlist$$file "; \
OK="$${OK:-retry}"; \
+ [ "$${OK}" = "retry" -a ${FETCH_REGET} -gt 0 ] && ${RM} -f $${file}; \
ignored="false"; \
fi; \
fi; \