commit:     07f5c5330d4508990ad52e66af4e18f1f860b2eb
Author:     Ed Baker <edward.baker <AT> intel <DOT> com>
AuthorDate: Fri Nov  8 22:12:27 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov 12 22:24:31 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=07f5c533

Keep https_proxy populated for curl downloads

When building Chromium OS behind a proxy, https_proxy needs to be set
for curl. Additional discussion can be found at [1]. Chromium configures
the chroot FETCHCOMMAND at [2].

Example fetch command:
curl --ipv4 -f -y 30 --retry 9 -L \
     --output /var/cache/chromeos-cache/distfiles/host/zlib-1.2.11.tar.gz \
     
https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/zlib-1.2.11.tar.gz

Example error message:
>>> 13:49:14 === Start output for job zlib-1.2.11 ===
zlib-1.2.11: >>> Downloading 
'https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/zlib-1.2.11.tar.gz'
zlib-1.2.11:   % Total    % Received % Xferd  Average Speed   Time    Time     
Time  Current
zlib-1.2.11:                                  Dload  Upload   Total   Spent    
Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:02:10 --:--:--     0
zlib-1.2.11: curl: (7) Failed to connect to commondatastorage.googleapis.com 
port 443: Connection timed out
zlib-1.2.11: >>> Downloading 
'https://commondatastorage.googleapis.com/chromeos-mirror/gentoo/distfiles/zlib-1.2.11.tar.gz'
zlib-1.2.11:   % Total    % Received % Xferd  Average Speed   Time    Time     
Time  Current
zlib-1.2.11:                                  Dload  Upload   Total   Spent    
Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:02:11 --:--:--     0
zlib-1.2.11: curl: (7) Failed to connect to commondatastorage.googleapis.com 
port 443: Connection timed out
zlib-1.2.11: !!! Couldn't download 'zlib-1.2.11.tar.gz'. Aborting.
zlib-1.2.11:  * Fetch failed for sys-libs/zlib-1.2.11, Log file:
zlib-1.2.11:  *   /var/log/portage/sys-libs:zlib-1.2.11:20191108-204452.log

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1021751
[2] 
https://chromium.googlesource.com/chromiumos/platform/crosutils/+/master/sdk_lib/make_conf_util.sh

Closes: https://github.com/gentoo/portage/pull/478
Signed-off-by: Edward Baker <edward.baker <AT> intel.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 7bb2b1aa0..71cbdad2e 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -563,7 +563,7 @@ def create_trees(config_root=None, target_root=None, 
trees=None, env=None,
                clean_env = {}
                for k in ('PATH', 'PORTAGE_GRPNAME', 'PORTAGE_REPOSITORIES', 
'PORTAGE_USERNAME',
                        'PYTHONPATH', 'SSH_AGENT_PID', 'SSH_AUTH_SOCK', 'TERM',
-                       'ftp_proxy', 'http_proxy', 'no_proxy',
+                       'ftp_proxy', 'http_proxy', 'https_proxy', 'no_proxy',
                        '__PORTAGE_TEST_HARDLINK_LOCKS'):
                        v = settings.get(k)
                        if v is not None:

Reply via email to