ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD

Conrad J. Sabatier conrads at cox.net
Thu Jul 15 15:10:22 UTC 2004


>Number:         69104
>Category:       ports
>Synopsis:       bsd.port.mk assumes "fetch" as FETCH_CMD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 15 15:10:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Conrad J. Sabatier
>Release:        FreeBSD 5.2-CURRENT amd64
>Organization:
>Environment:

System: FreeBSD dolphin.local.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Jul 12 12:24:32 CDT 2004 root@:/usr/obj/usr/src/sys/CUSTOM amd64

>Description:
	The following section in bsd.port.mk's do-fetch: target renders using any
	FETCH_CMD other than the default "fetch" impossible.
	
	The case statement's "args" assignments are the chief problem.

            for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \
                ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
                DIR=${DIST_SUBDIR}; \
                CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
                case $${file} in \
                */*)    ${MKDIR} $${file%/*}; \
                        args="-o $${file} $${site}$${file}";; \
                *)      args=$${site}$${file};; \
                esac; \
                if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
                    continue 2; \
                fi \
            done; \

>How-To-Repeat:
	Try using "wget" as the FETCH_CMD and watch the breakage.
>Fix:
	Remove the assumption of "fetch" as the FETCH_CMD (and the concommitant assumption
	re: correct FETCH_CMD syntax).

	The case statement's "args" assignments need to be wrapped in yet another conditional,
	based on the setting of FETCH_CMD.  The simplest approach would be simply to set args
	to the target filename if [ $FETCH_CMD != fetch ] and let the user's FETCH_BEFORE_ARGS
	and FETCH_AFTER_ARGS take care of whatever other options/syntax is needed.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list