summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubertf <hubertf>1999-07-21 12:16:27 +0000
committerhubertf <hubertf>1999-07-21 12:16:27 +0000
commitf0e94cab90956c99fa8d842ad76b3906b4136b33 (patch)
tree6236e0005dd0afc4714b60b7fea98727c67770de
parent310e0e8f4f4c1ba264ce92b5ec097b4a45861595 (diff)
downloadpkgsrc-f0e94cab90956c99fa8d842ad76b3906b4136b33.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.mk6
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; \