mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #1366 from mvdbeek/fix_repository_install
Allow installation of different repositories with the same name in a …
This commit is contained in:
@@ -414,6 +414,23 @@ class RepositoryDependencyInstallManager( object ):
|
||||
all_repo_info_dicts_keys = [ d.keys()[ 0 ] for d in all_repo_info_dicts ]
|
||||
if required_repo_info_dict_key not in all_repo_info_dicts_keys:
|
||||
all_repo_info_dicts.append( required_repo_info_dict )
|
||||
else:
|
||||
# required_repo_info_dict_key corresponds to the repo name.
|
||||
# A single install transaction might require the installation of 2 or more repos
|
||||
# with the same repo name but different owners or versions.
|
||||
# Therefore, if required_repo_info_dict_key is already in all_repo_info_dicts,
|
||||
# check that the tool id is already present. If it is not, we are dealing with the same repo name,
|
||||
# but a different owner/changeset revision or version and we add the repo to the list of repos to be installed.
|
||||
tool_id = required_repo_info_dict[ required_repo_info_dict_key ][ 1 ]
|
||||
is_present = False
|
||||
for repo_info_dict in all_repo_info_dicts:
|
||||
for k, v in repo_info_dict.items():
|
||||
if required_repo_info_dict_key == k:
|
||||
if tool_id == v[1]:
|
||||
is_present = True
|
||||
break
|
||||
if not is_present:
|
||||
all_repo_info_dicts.append( required_repo_info_dict )
|
||||
all_required_repo_info_dict[ 'all_repo_info_dicts' ] = all_repo_info_dicts
|
||||
return all_required_repo_info_dict
|
||||
|
||||
|
||||
Reference in New Issue
Block a user