Date: Thu, 15 Jul 2004 10:09:05 -0500 (CDT) From: "Conrad J. Sabatier" <conrads@cox.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: portmgr@FreeBSD.org Subject: ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD Message-ID: <200407151509.i6FF95o7007578@dolphin.local.net> Resent-Message-ID: <200407151510.i6FFAKe9066482@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407151509.i6FF95o7007578>