commit/galaxy-central: greg: Fixes for displaying README files associated with an uninstalled tool shed repository.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f72fd96d3fac/ Changeset: f72fd96d3fac User: greg Date: 2013-05-10 20:24:19 Summary: Fixes for displaying README files associated with an uninstalled tool shed repository. Affected #: 2 files diff -r 43e37c4cc6cfbcdaba7e29a8bfac1b96dc5e7990 -r f72fd96d3fac5e17ec5c9aaece023b0ae74db696 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py --- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py @@ -1130,7 +1130,7 @@ """ Select or change the tool panel section to contain the tools included in the tool shed repository being reinstalled. If there are updates available for the repository in the tool shed, the tool_dependencies and repository_dependencies associated with the updated changeset revision - will have been retrieved from the tool shed and passed in the received kwd. In this case, the stored tool shed repository metqdata from the + will have been retrieved from the tool shed and passed in the received kwd. In this case, the stored tool shed repository metadata from the Galaxy database will not be used since it is outdated. """ message = '' @@ -1185,7 +1185,12 @@ includes_tool_dependencies = True if 'workflows' in metadata: includes_workflows = True - readme_files_dict = readme_util.build_readme_files_dict( metadata ) + # Since we're reinstalling, we need to send a request to the tool shed to get the README files. + url = suc.url_join( tool_shed_url, + 'repository/get_readme_files?name=%s&owner=%s&changeset_revision=%s' % \ + ( tool_shed_repository.name, tool_shed_repository.owner, tool_shed_repository.installed_changeset_revision ) ) + raw_text = common_util.tool_shed_get( trans.app, tool_shed_url, url ) + readme_files_dict = json.from_json_string( raw_text ) tool_dependencies = metadata.get( 'tool_dependencies', None ) repository_dependencies = self.get_repository_dependencies( trans=trans, repository_id=repository_id, diff -r 43e37c4cc6cfbcdaba7e29a8bfac1b96dc5e7990 -r f72fd96d3fac5e17ec5c9aaece023b0ae74db696 lib/tool_shed/util/metadata_util.py --- a/lib/tool_shed/util/metadata_util.py +++ b/lib/tool_shed/util/metadata_util.py @@ -1373,7 +1373,8 @@ invalid_tools = metadata.get( 'invalid_tools', None ) # Handle README files. if repository.has_readme_files: - if reinstalling: + if reinstalling or repository.status not in [ trans.model.ToolShedRepository.installation_status.DEACTIVATED, + trans.model.ToolShedRepository.installation_status.INSTALLED ]: # Since we're reinstalling, we need to send a request to the tool shed to get the README files. url = suc.url_join( tool_shed_url, 'repository/get_readme_files?name=%s&owner=%s&changeset_revision=%s' % \ 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