url_downloadable ignores proxy settings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-manager (Ubuntu) |
Fix Released
|
High
|
Michael Vogt | ||
Jaunty |
Fix Released
|
High
|
Michael Vogt | ||
Karmic |
Fix Released
|
High
|
Michael Vogt | ||
Lucid |
Fix Released
|
High
|
Michael Vogt |
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.
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(
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.
Changed in update-manager (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in update-manager (Ubuntu Jaunty): | |
status: | New → In Progress |
Changed in update-manager (Ubuntu Karmic): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in update-manager (Ubuntu Jaunty): | |
importance: | Undecided → High |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
tags: |
added: verification-done removed: verification-needed |
I should probably have mentioned that the end result is that, if you're behind a firewall, after clicking the "Upgrade" button to start a distribution upgrade, the Update Manager appears to hang. The reason is that it's sitting in url_downloadable, waiting for the connection to time out.
Correcting the function so that it uses the proxy causes it to launch instantly.