Thanks Daniel for the bug and the fix. I know its not a ideal fix, but
it should be good enough (and most importantly minimal enough) for
jaunty. I do some investigation now into a fix based on urrlib2 (it just
need to be made to do a HEAD request on http and a size() rquest on
ftp). But init_proxy() should deal with all the common cases for setting
up http_proxy

** Changed in: update-manager (Ubuntu Jaunty)
       Status: New => In Progress

** Changed in: update-manager (Ubuntu Karmic)
       Status: New => Confirmed

** Changed in: update-manager (Ubuntu Karmic)
   Importance: Undecided => High

** Changed in: update-manager (Ubuntu Jaunty)
   Importance: Undecided => High

** Description changed:

  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:
+   if scheme == "http":
+     import httplib
+     try:
  
  I added:
  
-       proxy = os.getenv('http_proxy')
-       if (proxy):
-         path = scheme + netloc + path
-         netloc = proxy
+       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.

** Changed in: update-manager (Ubuntu Lucid)
    Milestone: None => lucid-alpha-1

** Changed in: update-manager (Ubuntu Lucid)
     Assignee: (unassigned) => Michael Vogt (mvo)

** Changed in: update-manager (Ubuntu Jaunty)
     Assignee: (unassigned) => Michael Vogt (mvo)

-- 
url_downloadable ignores proxy settings
https://bugs.launchpad.net/bugs/446552
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to