summaryrefslogtreecommitdiffstats
path: root/scripts/lib/scriptutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/scriptutils.py')
-rw-r--r--scripts/lib/scriptutils.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 97854385d5..11f1a78e97 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -102,7 +102,7 @@ class FetchUrlFailure(Exception):
102 def __str__(self): 102 def __str__(self):
103 return "Failed to fetch URL %s" % self.url 103 return "Failed to fetch URL %s" % self.url
104 104
105def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False): 105def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirrors=False):
106 """ 106 """
107 Fetch the specified URL using normal do_fetch and do_unpack tasks, i.e. 107 Fetch the specified URL using normal do_fetch and do_unpack tasks, i.e.
108 any dependencies that need to be satisfied in order to support the fetch 108 any dependencies that need to be satisfied in order to support the fetch
@@ -150,6 +150,13 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False):
150 f.write('WORKDIR = "%s"\n' % tmpworkdir) 150 f.write('WORKDIR = "%s"\n' % tmpworkdir)
151 # Set S out of the way so it doesn't get created under the workdir 151 # Set S out of the way so it doesn't get created under the workdir
152 f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc')) 152 f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc'))
153 if not mirrors:
154 # We do not need PREMIRRORS since we are almost certainly
155 # fetching new source rather than something that has already
156 # been fetched. Hence, we disable them by default.
157 # However, we provide an option for users to enable it.
158 f.write('PREMIRRORS = ""\n')
159 f.write('MIRRORS = ""\n')
153 160
154 logger.info('Fetching %s...' % srcuri) 161 logger.info('Fetching %s...' % srcuri)
155 162