Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Aug 1995 22:55:15 -0700
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        ports@freebsd.org
Subject:   Updated bsd.port.mk patch
Message-ID:  <199508280555.WAA01337@silvia.HIP.Berkeley.EDU>

next in thread | raw e-mail | index | archive | help
Hello ports world.  Here is an updated version of the patch to let
bsd.port.mk try all the MASTER_SITES regardless of the brokenness of
ncftp.  The previous one I sent out was wrong, it didn't handle
PATCHFILES correctly.

Here they are, first, for the 2.2-current branch:

=======
--- /usr/src/share/mk/bsd.port.mk	Fri Aug 18 15:26:08 1995
+++ bsd.port.mk	Sun Aug 27 22:42:38 1995
@@ -452,15 +452,14 @@
 			${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 `/usr/bin/basename $$file` ]; then \
+					continue 2; \
 				fi \
 			done; \
-			if [ ! -f $$file -a ! -f `/usr/bin/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)
@@ -471,15 +470,14 @@
 			${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 -o -f `/usr/bin/basename $$file` ]; then \
+					continue 2; \
 				fi \
 			done; \
-			if [ ! -f $$file -a ! -f `/usr/bin/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
=======

and then for the 2.1-stable branch:

=======
--- bsd.port.mk	Tue Jun  6 03:56:34 1995
+++ /s/usr/share/mk/bsd.port.mk	Sun Aug 27 22:41:49 1995
@@ -421,15 +421,14 @@
 			${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)
@@ -440,15 +439,14 @@
 			${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 -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 ${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
=======

Please test them and let me know how they work for you.  Thanks!

Satoshi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508280555.WAA01337>