Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170894618
D59475.id186110.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D59475.id186110.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D59475: Mk/Scripts/do-fetch.sh: read distfiles from stdin to avoid ARG_MAX
Attached
Detach File
Event Timeline
Log In to Comment