summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/targetbuild.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/utils/targetbuild.py')
-rw-r--r--meta/lib/oeqa/utils/targetbuild.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index 77181b1c3d..32296762c0 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -11,8 +11,9 @@ import subprocess
11 11
12class TargetBuildProject(): 12class TargetBuildProject():
13 13
14 def __init__(self, target, uri, foldername=None): 14 def __init__(self, target, d, uri, foldername=None):
15 self.target = target 15 self.target = target
16 self.d = d
16 self.uri = uri 17 self.uri = uri
17 self.targetdir = "~/" 18 self.targetdir = "~/"
18 self.archive = os.path.basename(uri) 19 self.archive = os.path.basename(uri)
@@ -23,7 +24,22 @@ class TargetBuildProject():
23 24
24 def download_archive(self): 25 def download_archive(self):
25 26
26 subprocess.check_call("wget -O %s %s" % (self.localarchive, self.uri), shell=True) 27 exportvars = ['HTTP_PROXY', 'http_proxy',
28 'HTTPS_PROXY', 'https_proxy',
29 'FTP_PROXY', 'ftp_proxy',
30 'FTPS_PROXY', 'ftps_proxy',
31 'NO_PROXY', 'no_proxy',
32 'ALL_PROXY', 'all_proxy',
33 'SOCKS5_USER', 'SOCKS5_PASSWD']
34
35 cmd = ''
36 for var in exportvars:
37 val = self.d.getVar(var, True)
38 if val:
39 cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
40
41 cmd = cmd + "wget -O %s %s" % (self.localarchive, self.uri)
42 subprocess.check_call(cmd, shell=True)
27 43
28 (status, output) = self.target.copy_to(self.localarchive, self.targetdir) 44 (status, output) = self.target.copy_to(self.localarchive, self.targetdir)
29 if status != 0: 45 if status != 0: