From owner-freebsd-ports Sat Aug 26 04:20:06 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id EAA12902 for ports-outgoing; Sat, 26 Aug 1995 04:20:06 -0700 Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id EAA12896 ; Sat, 26 Aug 1995 04:20:03 -0700 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.6.11/8.6.9) id EAA01925; Sat, 26 Aug 1995 04:20:01 -0700 Date: Sat, 26 Aug 1995 04:20:01 -0700 Message-Id: <199508261120.EAA01925@silvia.HIP.Berkeley.EDU> To: torstenb@freebsd.org CC: ports@freebsd.org Subject: patch for bsd.port.mk From: asami@cs.berkeley.edu (Satoshi Asami) Sender: ports-owner@freebsd.org Precedence: bulk This is a patch to make bsd.port.mk handle bad master sites. The old one assumes that ncftp returns 0 only when the fetch has succeeded, which is not true depending on its version. It actually cleaned up the source a bit, as you can see. Note this is for the -stable tree, you need to edit it manually if you are running -current tree. Satoshi ======= diff -ur /s/usr/src/share/mk/bsd.port.mk ./bsd.port.mk --- /s/usr/src/share/mk/bsd.port.mk Tue Jun 6 03:56:34 1995 +++ ./bsd.port.mk Sat Aug 26 03:53:44 1995 @@ -421,34 +421,32 @@ ${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ for site in ${MASTER_SITES}; do \ ${ECHO_MSG} ">> Attempting to fetch from $${site}"; \ - if ${NCFTP} ${NCFTPFLAGS} $${site}$${file}; then \ - break; \ + (${NCFTP} ${NCFTPFLAGS} $${site}$${file} || true); \ + if [ -f $$file -o -f `basename $$file` ]; then \ + continue 2; \ fi \ done; \ - if [ ! -f $$file -a ! -f `basename $$file` ]; then \ - ${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ - ${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ - exit 1; \ - fi; \ + ${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ + ${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ + exit 1; \ fi \ done) .if defined(PATCHFILES) @if [ ! -d ${PATCHDIST} ]; then mkdir -p ${PATCHDIST}; fi @(cd ${PATCHDIST}; \ for file in ${PATCHFILES}; do \ - if [ ! -f $$file -a ! -f `basename $$file` ]; then \ + if [ -f $$file -o -f `basename $$file` ]; then \ ${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ for site in ${PATCH_SITES}; do \ ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ - if ${NCFTP} ${NCFTPFLAGS} $${site}$${file}; then \ - break; \ + (${NCFTP} ${NCFTPFLAGS} $${site}$${file} || true); \ + if [ ! -f $$file -a ! -f `basename $$file` ]; then \ + continue 2; \ fi \ done; \ - if [ ! -f $$file -a ! -f `basename $$file` ]; then \ - ${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ - ${ECHO_MSG} ">> port manually into ${PATCHDIST} and try again."; \ - exit 1; \ - fi; \ + ${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ + ${ECHO_MSG} ">> port manually into ${PATCHDIST} and try again."; \ + exit 1; \ fi \ done) .endif