diff options
author | hubertf <hubertf> | 1999-07-21 12:16:27 +0000 |
---|---|---|
committer | hubertf <hubertf> | 1999-07-21 12:16:27 +0000 |
commit | 1427c56060f66fd7e5a33af92214605c9f7d06de (patch) | |
tree | 6236e0005dd0afc4714b60b7fea98727c67770de | |
parent | a6cbf301f1db8bedab75afcd68b0eb68418ddc49 (diff) | |
download | pkgsrc-1427c56060f66fd7e5a33af92214605c9f7d06de.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>.
-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; \ |