195a196,206
> 		# handling fetch specific extension
> 		for fetchX in FETCH_ENABLE;  do
> 		    eval _=\$${fetchX}
> 			if [ -z "${_}" ]; then
> 				eval ${fetchX}=`grep "^${fetchX}=" "${CONFFILE}" |
> 				    cut -f 2- -d '=' | tail -1 | tr '[:lower:]' '[:upper:]'`
> 			fi
> 		done
> 		
> 
> 
268c279,293
< 	PHTTPGET=/usr/libexec/phttpget
---
> 
> 	# do we need the usage of fetch(1) instead of the
> 	# default phttpget?
> 	if [ "${FETCH_ENABLE}" = "YES" ]
> 	then
> 	    PHTTPGET=/usr/bin/fetch
> 	    PHTTPGET_OPTS=""
> 	    SERVER_PROTOCOL="http://"
> 	else
> 	    PHTTPGET=/usr/libexec/phttpget
> 	    SERVER_PROTOCOL=""
> 	fi
> 
> 	check_downloader
> 	echo "Will use [$PHTTPGET] as downloader"
687,690c712,717
< 	tr '|' '-' < patchlist |
< 	    lam -s "tp/" - -s ".gz" |
< 	    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
< 	    2>${STATSREDIR} | fetch_progress
---
> 
> 	for current_file in `tr '|' '-' < patchlist | lam -s "tp/" - -s ".gz"`
> 	do
> 	    ${PHTTPGET} ${PHTTPGET_OPTS} ${SERVER_PROTOCOL}${SERVERNAME}/${current_file} > /dev/null 2>${STATSREDIR}
> 	done
> 
721,724c748,754
< 	echo ${NDEBUG} "metadata files... "
< 	lam -s "f/" - -s ".gz" < filelist |
< 	    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
< 	    2>${QUIETREDIR}
---
> 	echo ${NDEBUG} "metadata files..."
> 
> 	for current_file in `cat filelist`
> 	do
> 	    ${PHTTPGET}  ${PHTTPGET_OPTS} ${SERVER_PROTOCOL}${SERVERNAME}/f/${current_file}.gz  > /dev/null 2>${STATSREDIR}
> 	done
> 	    
763,765c793,797
< 	tr '|' '-' < patchlist | lam -s "bp/" - |
< 	    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
< 	    2>${STATSREDIR} | fetch_progress
---
> 
> 	for current_file in `tr '|' '-' < patchlist | lam -s "bp/" - -s ".gz"`
> 	do
> 	    ${PHTTPGET}  ${PHTTPGET_OPTS} ${SERVER_PROTOCOL}${SERVERNAME}/${current_file}  > /dev/null 2>${STATSREDIR}
> 	done
794,796c826,830
< 	lam -s "f/" - -s ".gz" < filelist |
< 	    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
< 	    2>${QUIETREDIR}
---
> 
> 	for current_file in `lam -s "f/" - -s ".gz" < filelist`
> 	do
> 	    ${PHTTPGET}  ${PHTTPGET_OPTS} ${SERVER_PROTOCOL}${SERVERNAME}/${current_file}  > /dev/null 2>${STATSREDIR}
> 	done
997a1032,1072
> # check that the downloader program is set into the variable PHTTPGET
> # and that is executable (in the case of fetch(1) it must be available on
> # the system.
> #
> # In the case the downloader program is not usable the program will be aborted
> # with the following exit codes:
> # 99 = PHTTPGET internal variable not set
> # 98 = program does not exist
> # 97 = program is not executable
> #
> #
> check_downloader(){
>     should_exit=0
> 
>     if [ -z "${PHTTPGET}" ]
>     then
> 	echo "The downloader program is not set into the PHTTPGET variable!"
> 	should_exit=99
>     else
> 	if [ ! -f "${PHTTPGET}" ]
> 	then
> 	    echo "The downloader program $PHTTPGET does not exists!"
> 	    echo "See here: " `whereis "$PHTTPGET"`
> 	    should_exit=98
> 	else
> 	    if [ ! -x "${PHTTPGET}" ]
> 	    then
> 		echo "The downloader program $PHTTPGET is not executable!"
> 		should_exit=97
> 	    fi
> 	fi
>     fi
> 
>     if [ $should_exit -gt 0 ]
>     then
> 	echo "portsnap cannot continue, sorry"
> 	exit $should_exit
>     fi
> }
> 
> 
