add support for ECVS_PROXY/ECVS_PROXY_PORT #155017 by Botykai Zsolt
authorMike Frysinger <vapier@gentoo.org>
Mon, 11 Dec 2006 00:09:31 +0000 (00:09 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 11 Dec 2006 00:09:31 +0000 (00:09 +0000)
eclass/cvs.eclass

index aa68dfce253cce8d630c8a620a315734656ff551..002cc172448c15e7a520b090e6db6028fb740bad 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.65 2006/10/14 20:27:21 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.66 2006/12/11 00:09:31 vapier Exp $
 #
 # Maintainer: vapier@gentoo.org (and anyone who wants to help)
 
@@ -115,7 +115,6 @@ inherit eutils
 # ECVS_USER -- Username to use for authentication on the remote server
 [ -z "$ECVS_USER" ] && ECVS_USER="anonymous"
 
-
 # ECVS_PASS -- Password to use for authentication on the remote server
 [ -z "$ECVS_PASS" ] && ECVS_PASS=""
 
@@ -275,7 +274,10 @@ cvs_fetch() {
        then
                local server="${ECVS_USER}@${ECVS_SERVER}"
        else
-               local server=":${ECVS_AUTH}:${ECVS_USER}@${ECVS_SERVER}"
+               local connection="${ECVS_AUTH}"
+               [[ -n ${ECVS_PROXY} ]] && connection="${connection};proxy=${ECVS_PROXY}"
+               [[ -n ${ECVS_PROXY_PORT} ]] && connection="${connection};proxyport=${ECVS_PROXY_PORT}"
+               local server=":${connection}:${ECVS_USER}@${ECVS_SERVER}"
        fi
 
        # Switch servers automagically if needed