pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk/fetch



Module Name:    pkgsrc
Committed By:   asau
Date:           Tue Aug  9 15:16:35 UTC 2016

Modified Files:
        pkgsrc/mk/fetch: fetch-list.mk

Log Message:
Handle special case of URLs prepended with dash.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/mk/fetch/fetch-list.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/fetch/fetch-list.mk
diff -u pkgsrc/mk/fetch/fetch-list.mk:1.14 pkgsrc/mk/fetch/fetch-list.mk:1.15
--- pkgsrc/mk/fetch/fetch-list.mk:1.14  Sun Jun 19 10:23:56 2011
+++ pkgsrc/mk/fetch/fetch-list.mk       Tue Aug  9 15:16:35 2016
@@ -1,4 +1,4 @@
-# $NetBSD: fetch-list.mk,v 1.14 2011/06/19 10:23:56 plunky Exp $
+# $NetBSD: fetch-list.mk,v 1.15 2016/08/09 15:16:35 asau Exp $
 
 ######################################################################
 ### fetch-list (PUBLIC)
@@ -82,8 +82,16 @@ fetch-list-one-pkg:
                ${ECHO} "${MKDIR} ${_DISTDIR}";                         \
                ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \
                ${ECHO} 'for site in $$sites; do';                      \
-               ${ECHO} '       ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" 
${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
-               ${ECHO} '       ${ECHO} ${fetchfile:T} not fetched';    \
+               ${ECHO} '       case "$${site}" in';                    \
+               ${ECHO} '       -*)';                                   \
+               ${ECHO} '               ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site#-}" 
${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
+               ${ECHO} '               ${ECHO} ${fetchfile:T} not fetched';    \
+               ${ECHO} '               ;;';                            \
+               ${ECHO} '       *)';                                    \
+               ${ECHO} '               ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" 
${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
+               ${ECHO} '               ${ECHO} ${fetchfile:T} not fetched';    \
+               ${ECHO} '               ;;';                            \
+               ${ECHO} '       esac;';                 \
                ${ECHO} 'done; }';                                      \
                ${ECHO} ')';                                            \
        fi)
@@ -100,8 +108,16 @@ fetch-list-one-pkg:
                ${ECHO} "${MKDIR} ${_DISTDIR}";                         \
                ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \
                ${ECHO} 'for site in $$sites; do';                      \
-               ${ECHO} '       ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" 
${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
-               ${ECHO} '       ${ECHO} ${fetchfile:T} not fetched';    \
+               ${ECHO} '       case "$${site}" in';                    \
+               ${ECHO} '       -*)';                                   \
+               ${ECHO} '               ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site#-}" 
${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
+               ${ECHO} '               ${ECHO} ${fetchfile:T} not fetched';    \
+               ${ECHO} '               ;;';                            \
+               ${ECHO} '       *)';                                    \
+               ${ECHO} '               ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" 
${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
+               ${ECHO} '               ${ECHO} ${fetchfile:T} not fetched';    \
+               ${ECHO} '               ;;';                            \
+               ${ECHO} '       esac;';                 \
                ${ECHO} 'done; }';                                      \
        fi)
 .    endif



Home | Main Index | Thread Index | Old Index