Skip to content
Snippets Groups Projects
Commit 5b3fb59e authored by Florent Thiery's avatar Florent Thiery
Browse files

also configure apt-cacher-ng proxy, fixes #21177

parent 89543d76
No related branches found
No related tags found
No related merge requests found
...@@ -26,10 +26,18 @@ def setup(interactive=True): ...@@ -26,10 +26,18 @@ def setup(interactive=True):
apt_proxy += 'Acquire::http::Proxy "%s";\n' % http_proxy apt_proxy += 'Acquire::http::Proxy "%s";\n' % http_proxy
if https_proxy: if https_proxy:
apt_proxy += 'Acquire::https::Proxy "%s";\n' % https_proxy apt_proxy += 'Acquire::https::Proxy "%s";\n' % https_proxy
# apt-cacher-ng
apt_cacher_ng_conf_path = '/etc/apt-cacher-ng/acng.conf'
apt_cacher_ng_proxy = ''
if http_proxy:
apt_cacher_ng_proxy += 'Proxy: %s' % http_proxy
# write changes # write changes
files = ( files = (
(environment_path, environment), (environment_path, environment),
(apt_proxy_path, apt_proxy), (apt_proxy_path, apt_proxy),
(apt_cacher_ng_conf_path, apt_cacher_ng_proxy),
) )
for path, content in files: for path, content in files:
if os.path.exists(path): if os.path.exists(path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment