4

I'm trying to make the Update Manager work through the proxy on my ubuntu 9.10. I've tried what was suggested in this question, but the Update Manager still reports 409 conflict. Would really appreciate if anybody could help me with this.

The window manager solution turned out to simple: System->Administration->Synaptic package manager, then in the Synaptic window Settings->Preferences->Network. Manually enter the http_proxy field. And it works now. Still am curious as to how to do this from command line though.

ev-br
  • 161

2 Answers2

3

Proxy configuration in update-manager apparently happens at lines 179--228 of file /usr/share/pyshared/UpdateManager/Core/utils.py (checked on Lucid, line numbers and file name may be different on other versions). Despite what the comment say, the code looks for proxy settings in this order:

  1. the Acquire::http::Proxy setting in /etc/apt/apt.conf
  2. The Synaptic::useProxy, Synaptic::httpProxy, Synaptic::httpProxyPort settings in /root/.synaptic/synaptic.conf
  3. the /system/http_proxy/* settings in gconf

The first one found sets the http_proxy environment variable for children processes (i.e., the ones that actually perform the update/upgrade).

Therefore, my advice would be to try adding this line to /etc/apt/apt.conf:

Acquire::http::Proxy "http://proxyhost.example.org:8080/";

The exact syntax is documented in the apt.conf(5) man page

1

Have you tried to modify .bashrc? Something like that:

$ sudo echo "export http_proxy=http://user:pass@ProxyAddress:ProxyPort" >> /etc/bash.bashrc
$ sudo echo "export ftp_proxy=ftp://user:pass@ProxyAddress:ProxyPort" >> /etc/bash.bashrc