APT

Merge lp:~jibel/apt/bug.579647 into lp:~ubuntu-core-dev/apt/ubuntu

Proposed by Michael Vogt
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~jibel/apt/bug.579647
Merge into: lp:~ubuntu-core-dev/apt/ubuntu
Diff against target: 38 lines (+22/-0) (has conflicts)
1 file modified
debian/apt.postinst (+22/-0)
Text conflict in debian/apt.postinst
To merge this branch: bzr merge lp:~jibel/apt/bug.579647
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+25296@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Many thanks for the branch! I merged it with a minor modification and uploaded it to lucid-proposed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/apt.postinst'
2--- debian/apt.postinst 2010-05-14 07:42:05 +0000
3+++ debian/apt.postinst 2010-05-14 07:51:30 +0000
4@@ -5,6 +5,7 @@
5 # set the proxy based on the admin users gconf settings
6 #
7 set_apt_proxy_from_gconf() {
8+<<<<<<< TREE
9 # try SUDO_USER first
10 if [ -n "$SUDO_USER" ]; then
11 admin_user="$SUDO_USER"
12@@ -28,6 +29,27 @@
13 echo "Acquire::http::proxy \"http://$host:$port/\";" >> /etc/apt/apt.conf
14 fi
15 fi
16+=======
17+ if [ ! -n "$SUDO_USER" ]; then
18+ admin_user="$SUDO_USER"
19+ else
20+ admin_user=$(getent group admin|cut -d: -f4|cut -d, -f1)
21+ fi
22+
23+ if id -u "$admin_user" > /dev/null 2>&1; then
24+ if [ -x /usr/bin/sudo ] && [ -z "$http_proxy" ] && [ -x /usr/bin/gconftool ]; then
25+ use=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/use_http_proxy 2>/dev/null) || true
26+ host=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/host 2>/dev/null) || true
27+ port=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/port 2>/dev/null) || true
28+ if [ "$use" = "true" ] && [ -n "$host" ] && [ -n "$port" ]; then
29+ APT_CONF_PROXY=""
30+ eval $(apt-config shell APT_CONF_PROXY Acquire::http::proxy)
31+ if [ -z "$APT_CONF_PROXY" ]; then
32+ echo "Acquire::http::proxy \"http://$host:$port/\";" >> /etc/apt/apt.conf
33+ fi
34+ fi
35+ fi
36+>>>>>>> MERGE-SOURCE
37 fi
38 }
39

Subscribers

People subscribed via source and target branches