Date: Sat, 26 Aug 1995 04:20:01 -0700 From: asami@cs.berkeley.edu (Satoshi Asami) To: torstenb@freebsd.org Cc: ports@freebsd.org Subject: patch for bsd.port.mk Message-ID: <199508261120.EAA01925@silvia.HIP.Berkeley.EDU>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508261120.EAA01925>