summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/configure.py2
-rw-r--r--make/df-fetch.py13
-rw-r--r--make/df-verify.py2
3 files changed, 11 insertions, 6 deletions
diff --git a/make/configure.py b/make/configure.py
index e27b477fa..cf1894fb0 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1192,6 +1192,7 @@ def encodeDistfileConfig():
'verbosity': options.df_verbosity,
'accept-url': options.df_accept_url,
'deny-url': options.df_deny_url,
+ 'exhaust-url': options.df_exhaust_url,
}
try:
try:
@@ -1265,6 +1266,7 @@ def createCLI():
grp.add_option( '--df-verbose', default=1, action='count', dest='df_verbosity', help='increase distfile tools verbosity' )
grp.add_option( '--df-accept-url', default=[], action='append', metavar='SPEC', help='accept URLs matching regex pattern' )
grp.add_option( '--df-deny-url', default=[], action='append', metavar='SPEC', help='deny URLs matching regex pattern' )
+ grp.add_option( '--df-exhaust-url', default=False, action='store_true', help='try all active distfiles' )
cli.add_option_group( grp )
## add install options
diff --git a/make/df-fetch.py b/make/df-fetch.py
index eeb520c7a..914426bb0 100644
--- a/make/df-fetch.py
+++ b/make/df-fetch.py
@@ -64,17 +64,19 @@ class Tool(hb_distfile.Tool):
self.parser.add_option('--md5', default=None, action='store', metavar='HASH', help='verify MD5 HASH against data')
self.parser.add_option('--accept-url', default=[], action='append', metavar='SPEC', help='accept URL regex pattern')
self.parser.add_option('--deny-url', default=[], action='append', metavar='SPEC', help='deny URL regex pattern')
+ self.parser.add_option('--exhaust-url', default=None, action='store_true', help='try all active distfiles')
self.parser.add_option('--output', default=None, action='store', metavar='FILE', help='write to FILE')
self._parse()
def _load_config2(self, parser, data):
- parser.values.disable = data['disable-fetch']
- parser.values.accept_url = data['accept-url']
- parser.values.deny_url = data['deny-url']
+ parser.values.disable = data['disable-fetch']
+ parser.values.accept_url = data['accept-url']
+ parser.values.deny_url = data['deny-url']
+ parser.values.exhaust_url = data['exhaust-url']
def _run(self, error):
if self.options.disable:
- self.infof('%s disabled; stop.\n' % self.name)
+ self.infof('%s disabled; nothing to do.\n' % self.name)
sys.exit(0)
if len(self.args) < 1:
self.parser.print_usage()
@@ -93,7 +95,8 @@ class Tool(hb_distfile.Tool):
url = urls.pop(0)
try:
url.download(error)
- break
+ if not self.options.exhaust_url:
+ break
except Exception, x:
## propagate exception if no remaining urls
if not urls:
diff --git a/make/df-verify.py b/make/df-verify.py
index 2d56afaa5..adeb9af78 100644
--- a/make/df-verify.py
+++ b/make/df-verify.py
@@ -62,7 +62,7 @@ class Tool(hb_distfile.Tool):
def _run(self, error):
if self.options.disable:
- self.infof('%s disabled; stop.\n' % self.name)
+ self.infof('%s disabled; nothing to do.\n' % self.name)
sys.exit(0)
if len(self.args) != 1:
self.parser.print_usage()