diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2013-08-31 09:16:24 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2013-08-31 09:16:24 +0800 |
commit | 0bc235f4ce8eb38fe00ff476c9d92efca5af7262 (patch) | |
tree | 38a47c85728d24eafba68fb806d2472942b31c97 | |
parent | 2fc742f2f42e4edf161481231f2dd4409c2fd22a (diff) | |
download | freebsd-ports-gnome-0bc235f4ce8eb38fe00ff476c9d92efca5af7262.tar.gz freebsd-ports-gnome-0bc235f4ce8eb38fe00ff476c9d92efca5af7262.tar.zst freebsd-ports-gnome-0bc235f4ce8eb38fe00ff476c9d92efca5af7262.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
-rw-r--r-- | Mk/bsd.port.mk | 1 |
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; \ |