--- utils.py.dist 2009-11-03 17:01:13.134963685 +1100 +++ utils.py 2009-11-03 17:13:35.293419532 +1100 @@ -112,9 +112,16 @@ """ SYNAPTIC_CONF_FILE = "/root/.synaptic/synaptic.conf" proxy = None - # generic apt config wins + + # Load generic apt config file apt_pkg.InitConfig() - if apt_pkg.Config.Find("Acquire::http::Proxy") != '': + + # Try to get the http_proxy env variable first (always wins) + envProxy = os.getenv("http_proxy") + if envProxy != '': + proxy = envProxy + # then try apt proxy config + elif apt_pkg.Config.Find("Acquire::http::Proxy") != '': proxy = apt_pkg.Config.Find("Acquire::http::Proxy") # then synaptic elif os.path.exists(SYNAPTIC_CONF_FILE):