Merge ~smoser/simplestreams:fix/install-deps-apt-proxy into simplestreams:master

Proposed by Scott Moser
Status: Merged
Approved by: Scott Moser
Approved revision: 03332f8ecd40fc3174d0037b9784e8ce079d4bac
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~smoser/simplestreams:fix/install-deps-apt-proxy
Merge into: simplestreams:master
Diff against target: 19 lines (+6/-2)
1 file modified
tools/install-deps (+6/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Dan Watkins (community) Approve
Review via email: mp+351365@code.launchpad.net

Commit message

tools/install-deps: respect proxy vars when calling apt.

If this tool is called by non-root, it will sudo to call apt-get.
The change here is to respect (and pass along) http_proxy variables
to sudo when they are set.

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) :
review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/install-deps b/tools/install-deps
2index d58adc5..eb7cd63 100755
3--- a/tools/install-deps
4+++ b/tools/install-deps
5@@ -16,8 +16,12 @@ apt_get() {
6 fi
7 local emd=""
8 command -v "eatmydata" >/dev/null 2>&1 && emd="eatmydata"
9- sudo DEBIAN_FRONTEND=noninteractive $emd apt-get --quiet \
10- --assume-yes "$@" </dev/null
11+ sudo \
12+ ${http_proxy:+"http_proxy=${http_proxy}"} \
13+ ${https_proxy:+"https_proxy=${https_proxy}"} \
14+ ${no_proxy:+"no_proxy=${no_proxy}"} \
15+ DEBIAN_FRONTEND=noninteractive \
16+ $emd apt-get --quiet --assume-yes "$@" </dev/null
17 }
18
19 filter_installed_packages() {

Subscribers

People subscribed via source and target branches

to all changes: