Acquire::http::ProxyAutoDetect is executed multiple times for each host

Bug #814130 reported by Peter Wu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
APT
Invalid
Undecided
Unassigned
apt (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

For each host that is involved in an update/ installation, APT executes the command set in Acquire::http::ProxyAutoDetect. On a default installation, sudo apt-get update executed the command twice because archive.ubuntu.com and security.ubuntu.com are both mentioned in /etc/apt/sources.conf. As PPAs are commonly used, this increases to three.
With a lot of third-party repository sources, this number rises a lot. If the proxy detection command is slow, there might be a delay during the source lists updates and package installations.

Affected versions:
0.8.13.2ubuntu4.1 (Ubuntu Natty)
0.7.25.3ubuntu9.5 (Ubuntu Lucid)
0.8.15.2 (Debian unstable)

Steps to reproduce:
1. Create /etc/apt/print-message containing:
#!/bin/sh
echo CALLED >&2
2. Create /etc/apt/apt.conf.d/30proxy-test containing:
Acquire::http::ProxyAutoDetect "/etc/apt/print-message";
3. Run sudo apt-get update or install a PPA package which depends on a package from the official repos which is not installed yet
4. Clean up by removing /etc/apt/apt.conf.d/30proxy-test and /etc/apt/print-message

What I expected to happen:
CALLED should be printed once

What happened instead:
CALLED is printed a few times for each involved host.

Tags: lucid natty
Revision history for this message
Torsten Spindler (tspindler) wrote :

I can confirm the multiple calls for the ProxyAutoDetect script, following your setup above. I believe proxies can be set for different sources, so I think the auto-detect needs to run for any new source. I mark this bug as wishlist item.

Changed in apt (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Ken Sharp (kennybobs)
tags: added: lucid natty
Revision history for this message
dino99 (9d9) wrote :

Support for this version has ended

Changed in apt (Ubuntu):
status: Confirmed → Invalid
Changed in apt:
status: New → Invalid
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.