Page MenuHomeFreeBSD

D59475.id186110.diff
No OneTemporary

D59475.id186110.diff

diff --git a/Mk/Scripts/do-fetch.sh b/Mk/Scripts/do-fetch.sh
--- a/Mk/Scripts/do-fetch.sh
+++ b/Mk/Scripts/do-fetch.sh
@@ -26,7 +26,9 @@
;;
esac
-for _file in "${@}"; do
+# Read the list of files to fetch from stdin, one per line, instead of
+# from the command line to workatound ARG_MAX limits.
+while IFS= read -r _file; do
file=${_file%%:*}
# If this files has groups
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3114,16 +3114,16 @@
. if !target(do-fetch)
do-fetch:
. if !empty(DISTFILES)
- @${SETENV} \
+ @printf '%s\n' ${DISTFILES} | ${SETENV} \
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \
dp_SITE_FLAVOR=MASTER \
- ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/}
+ ${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. if defined(PATCHFILES) && !empty(PATCHFILES)
- @${SETENV} \
+ @printf '%s\n' ${PATCHFILES:C/:-p[0-9]//} | ${SETENV} \
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \
dp_SITE_FLAVOR=PATCH \
- ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/}
+ ${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. endif
#
@@ -3132,16 +3132,16 @@
. if !target(fetch-list)
fetch-list:
. if !empty(DISTFILES)
- @${SETENV} \
+ @printf '%s\n' ${DISTFILES} | ${SETENV} \
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \
dp_SITE_FLAVOR=MASTER \
- ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/}
+ ${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. if defined(PATCHFILES) && !empty(PATCHFILES)
- @${SETENV} \
+ @printf '%s\n' ${PATCHFILES:C/:-p[0-9]//} | ${SETENV} \
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \
dp_SITE_FLAVOR=PATCH \
- ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/}
+ ${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. endif
@@ -3150,16 +3150,16 @@
. if !target(fetch-url-list-int)
fetch-url-list-int:
. if !empty(DISTFILES)
- @${SETENV} \
+ @printf '%s\n' ${DISTFILES} | ${SETENV} \
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \
dp_SITE_FLAVOR=MASTER \
- ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/}
+ ${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. if defined(PATCHFILES) && !empty(PATCHFILES)
- @${SETENV} \
+ @printf '%s\n' ${PATCHFILES:C/:-p[0-9]//} | ${SETENV} \
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \
dp_SITE_FLAVOR=PATCH \
- ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/}
+ ${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. endif

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 8, 9:34 AM (1 h, 22 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38507391
Default Alt Text
D59475.id186110.diff (2 KB)

Event Timeline