Allow rewrite src.rpm files in download-task
Fixes: https://pagure.io/koji/issue/3461
This commit is contained in:
parent
b0ca9984a2
commit
c1f7b9db04
2 changed files with 74 additions and 5 deletions
|
|
@ -7006,14 +7006,16 @@ def anon_handle_download_task(options, session, args):
|
|||
if not_uniques:
|
||||
files_dict = {}
|
||||
for nu in not_uniques:
|
||||
for (_, _, vol, new_filename, task_id) in downloads:
|
||||
if new_filename == nu[0] and vol == nu[1]:
|
||||
files_dict.setdefault(new_filename, {'vol': vol, 'tasks': []})
|
||||
files_dict[new_filename]['tasks'].append(task_id)
|
||||
if not nu[0].endswith('src.rpm'):
|
||||
for (_, _, vol, new_filename, task_id) in downloads:
|
||||
if new_filename == nu[0] and vol == nu[1]:
|
||||
files_dict.setdefault(new_filename, {'vol': vol, 'tasks': []})
|
||||
files_dict[new_filename]['tasks'].append(task_id)
|
||||
for key, value in files_dict.items():
|
||||
warn('Duplicate file %s for volume %s (tasks [%s])' % (key, value['vol'],
|
||||
", ".join(value['tasks'])))
|
||||
error("Download files names conflict, use --dirpertask")
|
||||
if files_dict != {}:
|
||||
error("Download files names conflict, use --dirpertask")
|
||||
|
||||
# perform the download
|
||||
number = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue