summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-03-26 17:08:19 +0000
committeragc <agc@pkgsrc.org>2001-03-26 17:08:19 +0000
commitf021b661087d9d9d52554fe3a9b157d678f87363 (patch)
treebf0e2786df6ee83cee3f9a24cbe8466973ab9725 /mk/bsd.pkg.mk
parent4a384ed1359e0d5b08a2c6c1c7dac6f922c743c0 (diff)
downloadpkgsrc-f021b661087d9d9d52554fe3a9b157d678f87363.tar.gz
Provide a default digest algorithm in the case where FAILOVER_FETCH is
set, and a distfile which isn't in files/md5 is attempted to be downloaded. Fixes a problem pointed out by Dan Mcmahill.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 15f9ff98c82..5773412042d 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.698 2001/03/26 17:04:50 fredb Exp $
+# $NetBSD: bsd.pkg.mk,v 1.699 2001/03/26 17:08:19 agc Exp $
#
# This file is in the public domain.
#
@@ -1278,6 +1278,9 @@ _FETCH_FILE= \
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${bfile} ${FETCH_AFTER_ARGS}; then \
if [ -n "${FAILOVER_FETCH}" -a -f ${DIGEST_FILE} -a -f ${_DISTDIR}/$$bfile ]; then \
alg=`${AWK} 'NF == 4 && $$2 == "('$$file')" && $$3 == "=" {print $$1;}' ${DIGEST_FILE}`; \
+ if [ -z "$$alg" ]; then \
+ alg=${DIGEST_ALGORITHM};\
+ fi; \
CKSUM=`${DIGEST} $$alg < ${_DISTDIR}/$$bfile`; \
CKSUM2=`${AWK} '$$1 == "'$$alg'" && $$2 == "('$$file')" {print $$4;}' <${DIGEST_FILE}`; \
if [ "$$CKSUM" = "$$CKSUM2" -o "$$CKSUM2" = "IGNORE" ]; then \