ports/109966: [patch] Mk/bsd.port.mk: minor cleanup of FETCH_xxx
Edwin Groothuis
edwin at mavetju.org
Tue Mar 6 05:50:03 UTC 2007
>Number: 109966
>Category: ports
>Synopsis: [patch] Mk/bsd.port.mk: minor cleanup of FETCH_xxx
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 06 05:50:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Edwin Groothuis
>Release: FreeBSD 6.1-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386
>Description:
FETCH_CMD has arguments in it, making it impossible to cleanly
redefine the arguments where needed.
This patch makes it possible for people to change options for the
fetch command.
>How-To-Repeat:
>Fix:
Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.554
diff -u -r1.554 bsd.port.mk
--- bsd.port.mk 21 Feb 2007 05:40:11 -0000 1.554
+++ bsd.port.mk 6 Mar 2007 05:27:05 -0000
@@ -765,7 +765,10 @@
# For fetch:
#
# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH.
-# Default: "/usr/bin/fetch -ARr"
+# Default: "/usr/bin/fetch"
+# FETCH_ARGS - Default arguments to ${FETCH_CMD}
+# Default: "-ApRr": No 302 redirects, passive FTP,
+# keep failed transfers, restart transfer
# FETCH_BEFORE_ARGS
# - Arguments to ${FETCH_CMD} before filename.
# Default: none
@@ -2141,7 +2144,8 @@
.endif
.if exists(/usr/bin/fetch)
-FETCH_CMD?= /usr/bin/fetch -ApRr
+FETCH_ARGS?= -ApRr
+FETCH_CMD?= /usr/bin/fetch
FETCH_REGET?= 1
.if ${OSVERSION} >= 480000 && !defined(DISABLE_SIZE)
# Avoid -S for 4.7 and earlier since it causes fetch errors
@@ -2149,6 +2153,7 @@
.endif
.else
FETCH_CMD?= /usr/bin/ftp
+FETCH_ARGS?= -R
FETCH_REGET?= 0
.endif
@@ -3395,7 +3400,7 @@
args="-o $${file} $${site}$${file}";; \
*) args=$${site}$${file};; \
esac; \
- if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
+ if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_ARGS} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
continue 2; \
fi \
done; \
@@ -3449,7 +3454,7 @@
args="-o $${file} $${site}$${file}";; \
*) args=$${site}$${file};; \
esac; \
- if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
+ if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_ARGS} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
continue 2; \
fi \
done; \
@@ -4510,7 +4515,7 @@
*/*) args="-o $${file} $${site}$${file}";; \
*) args=$${site}$${file};; \
esac; \
- ${ECHO_CMD} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '|| ' ; \
+ ${ECHO_CMD} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_ARGS} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '|| ' ; \
done; \
${ECHO_CMD} "${ECHO_CMD} $${file} not fetched" ; \
fi \
@@ -4542,7 +4547,7 @@
*/*) args="-o $${file} $${site}$${file}";; \
*) args=$${site}$${file};; \
esac; \
- ${ECHO_CMD} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '|| ' ; \
+ ${ECHO_CMD} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_ARGS} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '|| ' ; \
done; \
${ECHO_CMD} "${ECHO_CMD} $${file} not fetched" ; \
fi \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list