commit/galaxy-central: greg: Add support for ordering installation of tool shed repositories into Galaxy via the Galaxy API.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/18b23ed8de5b/ Changeset: 18b23ed8de5b User: greg Date: 2013-04-18 17:07:25 Summary: Add support for ordering installation of tool shed repositories into Galaxy via the Galaxy API. Affected #: 1 file diff -r aaf9f60d8be28a1a3a896c51a5d4895563c8c0a3 -r 18b23ed8de5b384f142db349e7379c03567758df lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py --- a/lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py +++ b/lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py @@ -240,10 +240,16 @@ # changeset_revision, there may be multiple repositories for installation at this point because repository dependencies may have added # additional repositories for installation along with the single specified repository. encoded_kwd, query, tool_shed_repositories, encoded_repository_ids = repository_util.initiate_repository_installation( trans, installation_dict ) + # Some repositories may have repository dependencies that are required to be installed before the dependent repository, so we'll + # order the list of tsr_ids to ensure all repositories install in the required order. + tsr_ids = [ trans.security.encode_id( tool_shed_repository.id ) for tool_shed_repository in tool_shed_repositories ] + ordered_tsr_ids, ordered_repo_info_dicts, ordered_tool_panel_section_keys = \ + repository_util.order_components_for_installation( trans, tsr_ids, repo_info_dicts, tool_panel_section_keys ) # Install the repositories, keeping track of each one for later display. - for index, tool_shed_repository in enumerate( tool_shed_repositories ): - repo_info_dict = repo_info_dicts[ index ] - tool_panel_section_key = tool_panel_section_keys[ index ] + for index, tsr_id in enumerate( ordered_tsr_ids ): + tool_shed_repository = trans.sa_session.query( trans.model.ToolShedRepository ).get( trans.security.decode_id( tsr_id ) ) + repo_info_dict = ordered_repo_info_dicts[ index ] + tool_panel_section_key = ordered_tool_panel_section_keys[ index ] repository_util.install_tool_shed_repository( trans, tool_shed_repository, repo_info_dict, Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org