FreeBSD Bugzilla – Attachment 54638 Details for
Bug 82661
[patch] Add support to filter MASTER_SITES and PATCH_SITES by protocol in bsd.port.mk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
bsd.port.mk_fetch_only_site.diff
bsd.port.mk_fetch_only_site.diff (text/plain), 2.68 KB, created by
Vasil Dimov
on 2005-06-26 11:00:35 UTC
(
hide
)
Description:
bsd.port.mk_fetch_only_site.diff
Filename:
MIME Type:
Creator:
Vasil Dimov
Created:
2005-06-26 11:00:35 UTC
Size:
2.68 KB
patch
obsolete
>Index: bsd.port.mk >=================================================================== >RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v >retrieving revision 1.515 >diff -u -r1.515 bsd.port.mk >--- bsd.port.mk 24 Jun 2005 09:18:54 -0000 1.515 >+++ bsd.port.mk 26 Jun 2005 09:39:24 -0000 >@@ -138,6 +138,10 @@ > # CD_MOUNTPTS - List of CDROM mountpoints to look for distfiles under. > # This variable supercedes CD_MOUNTPT, which is > # obsolete. >+# FETCH_ONLY_SITES >+# - List of allowed prefixes for sites from which to try to fetch >+# distfiles and patchfiles. >+# Example: FETCH_ONLY_SITES=http fetch only from http sites. > # > # Set these if your port should not be built under certain circumstances. > # These are string variables; you should set them to the reason why >@@ -3109,9 +3113,30 @@ > # Fetch > > .if !target(do-fetch) >+ >+FUNC_FETCH_FILTER_SITE=\ >+fetch_filter_site() { \ >+ site=$${1} ; \ >+ ret=1 ; \ >+ if [ -n "${FETCH_ONLY_SITES}" ] ; then \ >+ ret=0 ; \ >+ for fetch_only_site in ${FETCH_ONLY_SITES} ; do \ >+ if [ "$${site}" != "$${site\#$${fetch_only_site}}" ] ; then \ >+ ret=1 ; \ >+ break ; \ >+ fi ; \ >+ done ; \ >+ fi ; \ >+ if [ $${ret} -eq 0 ] ; then \ >+ ${ECHO_MSG} "=> Skipping site $${site} due to FETCH_ONLY_SITES filter." ; \ >+ fi ; \ >+ return $$ret ; \ >+} >+ > do-fetch: > @${MKDIR} ${_DISTDIR} >- @(cd ${_DISTDIR}; \ >+ @(${FUNC_FETCH_FILTER_SITE} ; \ >+ cd ${_DISTDIR}; \ > ${_MASTER_SITES_ENV} ; \ > for _file in ${DISTFILES}; do \ > file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ >@@ -3160,7 +3185,10 @@ > SORTED_MASTER_SITES_CMD_TMP="${SORTED_MASTER_SITES_DEFAULT_CMD}" ; \ > fi ; \ > for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \ >- ${ECHO_MSG} "=> Attempting to fetch from $${site}."; \ >+ if fetch_filter_site "$${site}" ; then \ >+ continue ; \ >+ fi ; \ >+ ${ECHO_MSG} "=> Attempting to fetch from $${site}."; \ > DIR=${DIST_SUBDIR}; \ > CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ > case $${file} in \ >@@ -3178,7 +3206,8 @@ > fi \ > done) > .if defined(PATCHFILES) >- @(cd ${_DISTDIR}; \ >+ @(${FUNC_FETCH_FILTER_SITE} ; \ >+ cd ${_DISTDIR}; \ > ${_PATCH_SITES_ENV} ; \ > for _file in ${PATCHFILES}; do \ > file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ >@@ -3213,6 +3242,9 @@ > SORTED_PATCH_SITES_CMD_TMP="${SORTED_PATCH_SITES_DEFAULT_CMD}" ; \ > fi ; \ > for site in `eval $$SORTED_PATCH_SITES_CMD_TMP`; do \ >+ if fetch_filter_site "$${site}" ; then \ >+ continue ; \ >+ fi ; \ > ${ECHO_MSG} "=> Attempting to fetch from $${site}."; \ > DIR=${DIST_SUBDIR}; \ > pattern="$${DIR:+$$DIR/}`${ECHO_CMD} $$file | ${SED} -e 's/\./\\\\./g'`"; \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 82661
: 54638