diff options
author | hubertf <hubertf@pkgsrc.org> | 1999-07-21 12:16:27 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1999-07-21 12:16:27 +0000 |
commit | cc70551e0ea1510757124abdefae37443d01867f (patch) | |
tree | 6236e0005dd0afc4714b60b7fea98727c67770de /mk | |
parent | d51b9806c46829fe4d6a5c8f9eae910bf6cf8bee (diff) | |
download | pkgsrc-cc70551e0ea1510757124abdefae37443d01867f.tar.gz |
Some master-sites (like the second one of the libslang package) seem
to return some "please see the new location"-pages instead of the
requested archive, which our ftp(1) doesn't take as an error.
Now, add a check here to see if ftp(1) actually got the requested file
or something else.
Detected by Reinoud Zandijk <zandijk@cs.utwente.nl>, talked over with
Frederick Bruckman <fb@enteract.com>.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 23a26600c65..f159c809e9f 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.299 1999/07/17 19:26:44 tron Exp $ +# $NetBSD: bsd.pkg.mk,v 1.300 1999/07/21 12:16:27 hubertf Exp $ # # This file is in the public domain. # @@ -858,7 +858,7 @@ _FETCH_FILE= \ for site in $$sites; do \ ${ECHO_MSG} ">> Attempting to fetch $$bfile from $${site}."; \ if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${bfile} ${FETCH_AFTER_ARGS}; then \ - if [ -n "${FAILOVER_FETCH}" -a -f ${MD5_FILE} ]; then \ + if [ -n "${FAILOVER_FETCH}" -a -f ${MD5_FILE} -a -f ${_DISTDIR}/$$bfile ]; then \ CKSUM=`${MD5} < ${_DISTDIR}/$$bfile`; \ CKSUM2=`${AWK} '$$1 == "MD5" && $$2 == "('$$file')"{print $$4;}' ${MD5_FILE}`; \ if [ "$$CKSUM" = "$$CKSUM2" -o "$$CKSUM2" = "IGNORE" ]; then \ @@ -866,6 +866,8 @@ _FETCH_FILE= \ else \ ${ECHO_MSG} ">> Checksum failure - trying next site."; \ fi; \ + elif [ ! -f ${_DISTDIR}/$$bfile ]; then \ + ${ECHO_MSG} ">> FTP didn't fetch expected file, trying next site." ; \ else \ continue 2; \ fi; \ |