Enabling fetch.type svn to work with a proxy

Christoph Iserlohn ciserlohn at macports.org
Tue Aug 21 01:51:21 PDT 2012


2012/8/21 Ryan Schmidt <ryandesign at macports.org>:

>
> On Aug 20, 2012, at 16:59, Christoph Iserlohn wrote:
>
>> I assume you refer to a enviroment variable 'http_proxy'.
>
> Shouldn't it be looking at the proxy* variables in macports.conf instead
of environment variables which would have already been cleared?
>

I thought the proxy* variables from macports.conf would be injected into
the env variable.
The relevant part from macports.tcl:

# Proxy handling (done this late since Pextlib is needed)
    if {![info exists proxy_override_env] } {
        set proxy_override_env "no"
    }
    if {[catch {array set sysConfProxies
[get_systemconfiguration_proxies]} result]} {
        return -code error "Unable to get proxy configuration from system:
$result"
    }
    if {![info exists env(http_proxy)] || $proxy_override_env == "yes" } {
        if {[info exists proxy_http]} {
            set env(http_proxy) $proxy_http
        } elseif {[info exists sysConfProxies(proxy_http)]} {
            set env(http_proxy) $sysConfProxies(proxy_http)
        }
    }
    if {![info exists env(HTTPS_PROXY)] || $proxy_override_env == "yes" }
{
        if {[info exists proxy_https]} {
            set env(HTTPS_PROXY) $proxy_https
        } elseif {[info exists sysConfProxies(proxy_https)]} {
            set env(HTTPS_PROXY) $sysConfProxies(proxy_https)
        }
    }
    if {![info exists env(FTP_PROXY)] || $proxy_override_env == "yes" } {
        if {[info exists proxy_ftp]} {
            set env(FTP_PROXY) $proxy_ftp
        } elseif {[info exists sysConfProxies(proxy_ftp)]} {
            set env(FTP_PROXY) $sysConfProxies(proxy_ftp)
        }
    }
    if {![info exists env(RSYNC_PROXY)] || $proxy_override_env == "yes" }
{
        if {[info exists proxy_rsync]} {
            set env(RSYNC_PROXY) $proxy_rsync
        }
    }
    if {![info exists env(NO_PROXY)] || $proxy_override_env == "yes" } {
        if {[info exists proxy_skip]} {
            set env(NO_PROXY) $proxy_skip
        } elseif {[info exists sysConfProxies(proxy_skip)]} {
            set env(NO_PROXY) $sysConfProxies(proxy_skip)
        }
    }

--
Christoph


More information about the macports-dev mailing list