[rtems-source-builder commit] sb: Create hopefully more valid file names
chrisj at rtems.org
Thu Jun 8 05:49:09 UTC 2017
On 07/06/2017 23:23, Sebastian Huber wrote:
> @@ -180,12 +181,9 @@ 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.
> + # Wipe out everything special in the file name.
> - if '?' in source['file']:
> - qmark = source['file'].find('?')
> - source['file'] = source['file'][:qmark]
> + source['file'] = re.sub(r'[^a-zA-Z0-9.\-]+', '-', source['file'])
I back ported this file back to 4.11 (see #3033) and this change has broken:
The change in this patch means by default files names will be unique for
different URLs which is nice and I suppose it is just a matter of getting the
hashes to match.
I think I will merge the difference for the 4.11 branch.
More information about the devel