[Bug 446552] Re: url_downloadable ignores proxy settings
Daniel
446552 at bugs.launchpad.net
Tue Oct 25 15:17:02 UTC 2011
Just trying to update from natty (11.04) to oneiric (11.10) and having
the same problem: do-release-upgrade, started from console, hangs.
http_proxy set, but Proxy settings in gnome are not set. Any console
application should use http_proxy as first option
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/446552
Title:
url_downloadable ignores proxy settings
Status in “update-manager” package in Ubuntu:
Fix Released
Status in “update-manager” source package in Lucid:
Fix Released
Status in “update-manager” source package in Jaunty:
Fix Released
Status in “update-manager” source package in Karmic:
Fix Released
Bug description:
Binary package hint: update-manager
TEST CASE:
1. define a proxy server somewhere (gconf, apt.conf, synaptic)
2.use iptables to disallow access to port 80
3. run update-manager and click on the "upgrade" button
4. verify that the upgrade hangs
4. install update-manager from jaunty-proposed
5. repeat step 3
6. verify that it now continues
When updating to 9.10 from from 9.04, the update-manager uses a
utility function called "UpdateManager.Core.utils.url_downloadable".
This function skips urllib2 - which is properly configured to use the
proxy settings - and instead directly interacts with httplib, which
requires the caller to properly set up the request in order to use the
proxy.
Changing the url_downloadable function to use the proxy resolves the
issue.
Specifically, I after:
if scheme == "http":
import httplib
try:
I added:
proxy = os.getenv('http_proxy')
if (proxy):
path = scheme + netloc + path
netloc = proxy
This resolved the problem. This, however, isn't really a fix - it
relies on the fact that init_proxy sets the http_proxy environment
variable and ignores anything else that might set up urllib2 to
properly use a proxy server.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/446552/+subscriptions
More information about the foundations-bugs
mailing list