url_downloadable does not respect proxy

Bug #396187 reported by Adam Guthrie
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Medium
Unassigned

Bug Description

url_downloadable in lucid is used to detect old-release.ubuntu.com upgrades and to figure out the best location to downolaod the release-upgrader tarball. Failure on this is not critical, just leads to using archive.ubuntu.com instead of the selected mirror when a proxy is given. Still worth fixing for the old-release.ubuntu.com upgrade case.

TEST CASE (lucid):
1. use lucid and ensure you use a country proxy like de.archive.ubuntu.com
2. /etc/update-manager/release-upgrades to "prompt=normal"
3. run "do-release-upgrade -d" to get to maverick
4. watch the proxy log (e.g. /var/log/squid/access.log) that archive.ubuntu.com is used to download http://archive.ubuntu.com/ubuntu/dists/maverick/main/dist-upgrader-all/current/maverick.tar.gz
5. install update-manager from lucid-proposed
6. repeat 3
7. verify in the proxy log that de.archive.ubuntu.com (or what mirror you selected) is used now

Binary package hint: update-manager-core

Description: Ubuntu 9.04
Release: 9.04

Version: 1:0.111.7

url_downloadable in /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py does not respect a http proxy. Therefore

sudo do-release-update -d

hangs whilst checking if the UpdateToolSig is downloadable.

Changed in update-manager-core (Ubuntu):
status: New → Confirmed
Revision history for this message
Paulo Albuquerque (paulo.albuquerque) wrote :

I'm seeing this behavior too. I was trying to update an Ubuntu Server to test Karmic and spotted this. It was very weird because "sudo do-release-upgrade" apparently works and "sudo do-release-upgrade -d" doesn't.

I checked the process environment and the $http_proxy variable is correctly defined. Then I started fiddling with the python script and found this bug.

Revision history for this message
Paulo Albuquerque (paulo.albuquerque) wrote :

I solved the problem and tested it on my system. The upgrade to a development release now works fine.

I use urllib2 to test the repository url insted of using httplib and ftplib, so the proxy definitions are used. The code is more compact too.

Can someone have a look?

tags: added: jaunty
Revision history for this message
Jayson Reis (jaysonsantos2003) wrote :

At the end of line 48 it is missing a :
I tried that and still not working, I will try to build a opener with proxy.

Revision history for this message
Riku Voipio (riku-voipio) wrote :

After adding the patch in comment #2 and the fix comment #2, it works for me.

Quite sad that this bug was not fixed in one month after the patch was submitted :'(

Adam Guthrie (therigu)
affects: update-manager-core (Ubuntu) → update-manager (Ubuntu)
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the bugreport and the patch. The patch is not ideal because urllib2 always uses GET (for http) and RETR (for ftp). This is not ideal as it will cause more traffic than needed, especially when looking for a big File like Packages.gz. This is why the (more complicated) version with httplib/ftplib is used. In trunk this should be fixed and proxy support should be fully working.

Changed in update-manager (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Michael Vogt (mvo) wrote :

  * UpdateManager/Core/utils.py:
    - fix url_downloadable and add tests, based on the patch from
      Paulo Albuquerque, many thanks (LP: #396187)

Changed in update-manager (Ubuntu):
status: Fix Released → Fix Committed
Michael Vogt (mvo)
Changed in update-manager (Ubuntu Lucid):
status: New → In Progress
importance: Undecided → Medium
Michael Vogt (mvo)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.141

---------------
update-manager (1:0.141) maverick; urgency=low

  * UpdateManager/backend/__init__.py:
    - switch to aptdaemon as install backend by default (unless
      the user has UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC in his
      environment)
    - merged lp:~glatzor/update-manager/ubuntu-glatzor (many thanks!)
  * DistUpgrade/DistUpgradeController.py:
   - use pockets from DistUpgrade.cfg instead of hard-coding them
  * tests/test_sources_list.py:
    - update tests
  * UpdateManager/Core/utils.py:
    - fix url_downloadable and add tests, based on the patch from
      Paulo Albuquerque, many thanks (LP: #396187)
  * UpdateManager/UpdateManager.py:
    - fix typo (thanks to seb128)
  * DistUpgrade/mirrors.cfg:
    - support upgrades when sources.list uses the new
      mirror://mirrors.ubuntu.com/mirrors.txt
      uri
  * UpdateManager/GtkProgress.py:
    - do not open a cache open progress window, instead show the
      progress inline in the window
 -- Michael Vogt <email address hidden> Mon, 31 May 2010 15:14:22 +0200

Changed in update-manager (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted update-manager into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in update-manager (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with update-manager 1:0.134.9 in lucid-updates and have verified that the version of update-manager 1:0.134.10 in -proposed fixes the issue. I've tested to the stage where update-manager starts to download the packages.

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.134.10

---------------
update-manager (1:0.134.10) lucid-proposed; urgency=low

  * DistUpgrade/DistUpgradeMain.py:
    - add filter for "apt API not stable yet" warning (for
      hardy->lucid upgrades) (LP: #534200)
  * UpdateManager/Core/utils.py:
    - fix url_downloadable and add tests, based on the patch from
      Paulo Albuquerque, many thanks (LP: #396187)
  * DistUpgrade/DistUpgradeViewNonInteractive.py:
    - make the dpkg-status file parser more robust against
      unexpected data (LP: #574837)
 -- Michael Vogt <email address hidden> Wed, 30 Jun 2010 16:01:01 +0200

Changed in update-manager (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.