Fix handling of repository tools and tool dependencies. Fix issue with functional tests altering the integrated tool panel.

This commit is contained in:
Dave Bouvier
2012-12-21 10:32:45 -05:00
parent 7c62a35e87
commit 831231aeb2
2 changed files with 9 additions and 6 deletions
+4 -3
View File
@@ -75,8 +75,9 @@ def add_to_tool_panel( app, repository_name, repository_clone_url, changeset_rev
# Replace the old list of in-memory config_elems with the new list for this shed_tool_conf_dict.
shed_tool_conf_dict[ 'config_elems' ] = config_elems
app.toolbox.shed_tool_confs[ index ] = shed_tool_conf_dict
# Write the current in-memory version of the integrated_tool_panel.xml file to disk.
app.toolbox.write_integrated_tool_panel_config_file()
if app.config.update_integrated_tool_panel:
# Write the current in-memory version of the integrated_tool_panel.xml file to disk.
app.toolbox.write_integrated_tool_panel_config_file()
app.toolbox_search = ToolBoxSearch( app.toolbox )
def alter_config_and_load_prorietary_datatypes( app, datatypes_config, relative_install_dir, deactivate=False, override=True ):
"""
@@ -1055,7 +1056,7 @@ def remove_from_tool_panel( trans, repository, shed_tool_conf, uninstall ):
shed_tool_conf_dict[ 'config_elems' ] = config_elems
trans.app.toolbox.shed_tool_confs[ index ] = shed_tool_conf_dict
trans.app.toolbox_search = ToolBoxSearch( trans.app.toolbox )
if uninstall:
if uninstall and trans.app.config.update_integrated_tool_panel:
# Write the current in-memory version of the integrated_tool_panel.xml file to disk.
trans.app.toolbox.write_integrated_tool_panel_config_file()
def remove_tool_dependency( trans, tool_dependency ):
@@ -1088,14 +1088,16 @@ class AdminToolshed( AdminGalaxy ):
if ( not includes_tools and not includes_repository_dependencies ) or \
( ( includes_tools or includes_repository_dependencies ) and kwd.get( 'select_tool_panel_section_button', False ) ):
install_repository_dependencies = CheckboxField.is_checked( install_repository_dependencies )
if includes_tool_dependencies:
install_tool_dependencies = CheckboxField.is_checked( install_tool_dependencies )
if includes_tools:
shed_tool_conf = kwd[ 'shed_tool_conf' ]
else:
install_tool_dependencies = False
# If installing a repository that includes no tools, get the relative tool_path from the file to which the migrated_tools_config
# setting points.
shed_tool_conf = trans.app.config.migrated_tools_config
if includes_tool_dependencies:
install_tool_dependencies = CheckboxField.is_checked( install_tool_dependencies )
else:
install_tool_dependencies = False
tool_path = suc.get_tool_path_by_shed_tool_conf_filename( trans, shed_tool_conf )
created_or_updated_tool_shed_repositories, repo_info_dicts, filtered_repo_info_dicts, message = \
shed_util.create_repository_dependency_objects( trans, tool_path, tool_shed_url, repo_info_dicts, reinstalling=False )