[rtems-source-builder commit] sb/download: Fix --rsb-file options with released sources.
Chris Johns
chrisj at rtems.org
Mon Jul 10 01:47:03 UTC 2017
Module: rtems-source-builder
Branch: 4.11
Commit: b487b7d130215a85212b2843ce049dc570294307
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=b487b7d130215a85212b2843ce049dc570294307
Author: Chris Johns <chrisj at rtems.org>
Date: Mon Jul 10 11:44:32 2017 +1000
sb/download: Fix --rsb-file options with released sources.
The released sources use the local file name so always force it when
the RSB is released.
Closes #3064.
---
source-builder/sb/download.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index 5744844..6c2593f 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -324,7 +324,6 @@ def parse_url(url, pathkey, config, opts, file_override = None):
bad_chars = [c for c in ['/', '\\', '?', '*'] if c in file_override]
if len(bad_chars) > 0:
raise error.general('bad characters in file name: %s' % (file_override))
-
log.output('download: file-override: %s' % (file_override))
source['file'] = file_override
source['options'] += ['file-override']
@@ -600,7 +599,6 @@ def get_file(url, local, opts, config):
rtems_release_url_value = config.macros.expand('%{release_path}')
except:
rtems_release_url_value = None
- log.output('RTEMS release URL could not be expanded')
rtems_release_url = None
if version.released() and rtems_release_url_value:
rtems_release_url = rtems_release_url_value
@@ -643,6 +641,12 @@ def get_file(url, local, opts, config):
url_file = url_path[slash + 1:]
log.trace('url_file: %s' %(url_file))
for base in url_bases:
+ #
+ # Hack to fix #3064 where --rsb-file is being used. This code is a
+ # mess and should be refactored.
+ #
+ if version.released() and base == rtems_release_url:
+ url_file = path.basename(local)
if base[-1:] != '/':
base += '/'
next_url = urllib_parse.urljoin(base, url_file)
More information about the vc
mailing list