/etc/cron.daily/apt incorrectly overrides apt.conf proxy settings with GNOME proxy settings, losing proxy exclusion list, and causes updates to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
/etc/cron.daily/apt will set a http_proxy variable whose contents are copied from GNOME Proxy settings. This does not allow the setting of an exclusion list (Acquire:
1) Network uses a proxy for Internet access
2) Network has a local mirror of Ubuntu that does not use proxy
apt.conf can handle this, but those proxy settings are overridden by this incorrect setting of http_proxy.
Attached is patch (against Hardy) which:
1) checks if apt.conf contains a proxy setting
2) if such a setting exists, no http_proxy variable is set otherwise current behaviour is maintained.
No attempt is made to set no_proxy.
Since apt-key net-update doesn't seem to obey apt.conf's proxy settings, the patch also sets http_proxy for apt-key net-update only based on apt.conf (when present).
The issue does not affect Debian, but does seem to affect Intrepid. Please fix since this is blocking our deployment of a local mirror.
An additional annoyance of this bug is that you get error mails from /etc/cron.daily/apt every day if the admin don't use gnome and the .gconf directory does not exist. If you run lots of servers, it gets very annoying.
Please, can somebody apply the patch that Sree attached?