summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-02-29 10:41:17 +1100
committerChris Johns <chrisj@rtems.org>2016-02-29 10:41:17 +1100
commit8dbb3a0dddaadad1041271d3a794a3570ea05878 (patch)
tree465209181235a1fa99c14998ab67de9ea75ba114
parentsb: bootstrap.py clearing of environ var 'ACLOCAL_PATH' on MSYS2 fails. (diff)
downloadrtems-source-builder-8dbb3a0dddaadad1041271d3a794a3570ea05878.tar.bz2
sb: Remove http query flags from the file name if present.
The query flags such as '?h=4.11' to select a branch cannot appear in the file name on Windows. This patch removes the query part from the file name. Update #2616.
-rw-r--r--source-builder/sb/download.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index 6e722ff..ffed422 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -1,6 +1,6 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2013 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2016 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -162,6 +162,13 @@ def _http_parser(source, pathkey, config, opts):
raise error.general('gitweb.cgi path missing p or h: %s' % (url))
source['file'] = '%s-%s.patch' % (p, h)
#
+ # Check the source file name for any extra request query data and remove if
+ # found. Some hosts do not like file names containing them.
+ #
+ if '?' in source['file']:
+ qmark = source['file'].find('?')
+ source['file'] = source['file'][:qmark]
+ #
# Check local path
#
_local_path(source, pathkey, config)