2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/aa6203b24be3/ Changeset: aa6203b24be3 Branch: next-stable User: greg Date: 2014-04-03 23:40:44 Summary: Better fix than ea1fbe9 and handle first discovered unhandled secure / insecure protocol issue when messing with the tool shed url for installed repositories. Affected #: 6 files diff -r 32cf6611bf3cf1249620ba265ed94ea430d9f4b1 -r aa6203b24be369697fd451e2a8dd45518d39073c 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 @@ -137,8 +137,8 @@ action='reselect_tool_panel_section', **kwd ) ) else: - message = "Unable to get latest revision for repository <b>%s</b> from the tool shed, so repository " % str( repository.name ) - message += "reinstallation is not possible at this time." + message = "Unable to get latest revision for repository <b>%s</b> from " % str( repository.name ) + message += "the Tool Shed, so repository reinstallation is not possible at this time." status = "error" return trans.response.send_redirect( web.url_for( controller='admin_toolshed', action='browse_repositories', @@ -986,12 +986,15 @@ # The Tool Shed cannot handle the get_repository_id request, so the code must be older than the # 04/2014 Galaxy release when it was introduced. It will be safest to error out and let the # Tool Shed admin update the Tool Shed to a later release. - err_msg = 'The Tool Shed %s is running a code revision that does not ' % str( tool_shed_url) - err_msg += 'allow updating an installed repository where the updates include newly defined repository ' - err_msg += 'or tool dependency definitions, so the repository %s cannot ' % str( repository.name ) - err_msg += 'be updated at this time. Contact the Tool Shed administrator if possible and' - err_msg += 'ask if they can update the Tool Shed code to the latest release.' - return trans.show_error_message( err_msg ) + message = 'The updates available for the repository <b>%s</b> ' % str( repository.name ) + message += 'include newly defined repository or tool dependency definitions, and attempting ' + message += 'to update the repository resulted in the following error. Contact the Tool Shed ' + message += 'administrator if necessary.<br/>%s' % str( e ) + status = 'error' + return trans.response.send_redirect( web.url_for( controller='admin_toolshed', + action='browse_repositories', + message=message, + status=status ) ) changeset_revisions = updating_to_changeset_revision else: changeset_revisions = kwd.get( 'changeset_revisions', None ) @@ -1811,7 +1814,7 @@ """Update a cloned repository to the latest revision possible.""" message = kwd.get( 'message', '' ) status = kwd.get( 'status', 'done' ) - tool_shed_url = kwd[ 'tool_shed_url' ] + tool_shed_url = kwd.get( 'tool_shed_url', None ) name = kwd.get( 'name', None ) owner = kwd.get( 'owner', None ) changeset_revision = kwd.get( 'changeset_revision', None ) diff -r 32cf6611bf3cf1249620ba265ed94ea430d9f4b1 -r aa6203b24be369697fd451e2a8dd45518d39073c lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -2535,18 +2535,19 @@ repository_metadata_id = trans.security.encode_id( repository_metadata.id ), metadata = repository_metadata.metadata # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. + toolshed_base_url = str( web.url_for( '/', qualified=True ) ).rstrip( '/' ) repository_dependencies = \ repository_dependency_util.get_repository_dependencies_for_changeset_revision( trans=trans, repository=repository, repository_metadata=repository_metadata, - toolshed_base_url=str( web.url_for( '/', qualified=True ) ).rstrip( '/' ), + toolshed_base_url=toolshed_base_url, key_rd_dicts_to_be_processed=None, all_repository_dependencies=None, handled_key_rd_dicts=None ) if metadata: if 'repository_dependencies' in metadata and not repository_dependencies: - # See if we have an invalid repository dependency definition or if the repository dependency is required only for compiling the - # repository's tool dependency. + # See if we have an invalid repository dependency definition or if the repository dependency is required + # only for compiling the repository's tool dependency. invalid = False repository_dependencies_dict = metadata[ 'repository_dependencies' ] rd_tups = repository_dependencies_dict.get( 'repository_dependencies', [] ) diff -r 32cf6611bf3cf1249620ba265ed94ea430d9f4b1 -r aa6203b24be369697fd451e2a8dd45518d39073c lib/tool_shed/util/commit_util.py --- a/lib/tool_shed/util/commit_util.py +++ b/lib/tool_shed/util/commit_util.py @@ -138,8 +138,8 @@ def handle_complex_repository_dependency_elem( trans, elem, sub_elem_index, sub_elem, sub_elem_altered, altered, unpopulate=False ): """ - Populate or unpopulate the toolshed and changeset_revision attributes of a <repository> tag that defines a complex repository - dependency. + Populate or unpopulate the toolshed and changeset_revision attributes of a <repository> tag that defines + a complex repository dependency. """ # The received sub_elem looks something like the following: # <repository name="package_eigen_2_0" owner="test" prior_installation_required="True" /> @@ -153,15 +153,16 @@ altered = True return altered, sub_elem_altered, elem, error_message -def handle_directory_changes( trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, commit_message, - undesirable_dirs_removed, undesirable_files_removed ): +def handle_directory_changes( trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, + commit_message, undesirable_dirs_removed, undesirable_files_removed ): repo_dir = repository.repo_path( trans.app ) repo = hg.repository( suc.get_configured_ui(), repo_dir ) content_alert_str = '' files_to_remove = [] filenames_in_archive = [ os.path.join( full_path, name ) for name in filenames_in_archive ] if remove_repo_files_not_in_tar and not repository.is_new( trans.app ): - # We have a repository that is not new (it contains files), so discover those files that are in the repository, but not in the uploaded archive. + # We have a repository that is not new (it contains files), so discover those files that are in the + # repository, but not in the uploaded archive. for root, dirs, files in os.walk( full_path ): if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0: for undesirable_dir in UNDESIRABLE_DIRS: @@ -413,9 +414,10 @@ # <install version="1.0"> for actions_index, actions_elem in enumerate( package_elem ): if actions_elem.tag == 'actions_group': - # Inspect all entries in the <actions_group> tag set, skipping <actions> tag sets that define os and architecture - # attributes. We want to inspect only the last <actions> tag set contained within the <actions_group> tag set to - # see if a complex repository dependency is defined. + # Inspect all entries in the <actions_group> tag set, skipping <actions> + # tag sets that define os and architecture attributes. We want to inspect + # only the last <actions> tag set contained within the <actions_group> tag + # set to see if a complex repository dependency is defined. for actions_group_index, actions_group_elem in enumerate( actions_elem ): if actions_group_elem.tag == 'actions': # Skip all actions tags that include os or architecture attributes. diff -r 32cf6611bf3cf1249620ba265ed94ea430d9f4b1 -r aa6203b24be369697fd451e2a8dd45518d39073c lib/tool_shed/util/export_util.py --- a/lib/tool_shed/util/export_util.py +++ b/lib/tool_shed/util/export_util.py @@ -228,11 +228,12 @@ repository = suc.get_repository_in_tool_shed( trans, repository_id ) repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision ) # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. + toolshed_base_url = str( web.url_for( '/', qualified=True ) ).rstrip( '/' ) repository_dependencies = \ repository_dependency_util.get_repository_dependencies_for_changeset_revision( trans=trans, repository=repository, repository_metadata=repository_metadata, - toolshed_base_url=str( web.url_for( '/', qualified=True ) ).rstrip( '/' ), + toolshed_base_url=toolshed_base_url, key_rd_dicts_to_be_processed=None, all_repository_dependencies=None, handled_key_rd_dicts=None ) diff -r 32cf6611bf3cf1249620ba265ed94ea430d9f4b1 -r aa6203b24be369697fd451e2a8dd45518d39073c lib/tool_shed/util/repository_dependency_util.py --- a/lib/tool_shed/util/repository_dependency_util.py +++ b/lib/tool_shed/util/repository_dependency_util.py @@ -106,6 +106,8 @@ only those items contained in the received repo_info_dicts list will be processed. """ log.debug( "Creating repository dependency objects..." ) + # Handle secure and insecure protocol since it may change over time. + tool_shed_url = suc.handle_tool_shed_url_protocol( trans.app, tool_shed_url ) # The following list will be maintained within this method to contain all created or updated tool shed repositories, # including repository dependencies that may not be installed. all_created_or_updated_tool_shed_repositories = [] @@ -293,8 +295,8 @@ def get_repository_dependencies_for_installed_tool_shed_repository( trans, repository ): """ - Send a request to the appropriate tool shed to retrieve the dictionary of repository dependencies defined for the received repository which is - installed into Galaxy. This method is called only from Galaxy. + Send a request to the appropriate tool shed to retrieve the dictionary of repository dependencies defined + for the received repository which is installed into Galaxy. This method is called only from Galaxy. """ tool_shed_url = suc.get_url_from_tool_shed( trans.app, repository.tool_shed ) url = suc.url_join( tool_shed_url, @@ -565,12 +567,13 @@ key_rd_dicts_to_be_processed = remove_from_key_rd_dicts( key_rd_dict, key_rd_dicts_to_be_processed ) else: # The repository is in a different tool shed, so build an url and send a request. - error_message = "Repository dependencies are currently supported only within the same tool shed. Ignoring repository dependency definition " + error_message = "Repository dependencies are currently supported only within the same Tool Shed. Ignoring repository dependency definition " error_message += "for tool shed %s, name %s, owner %s, changeset revision %s" % ( toolshed, name, owner, changeset_revision ) log.debug( error_message ) return toolshed, required_repository, required_repository_metadata, repository_key_rd_dicts, key_rd_dicts_to_be_processed, handled_key_rd_dicts -def handle_next_repository_dependency( trans, key_rd_dicts_to_be_processed, all_repository_dependencies, handled_key_rd_dicts, circular_repository_dependencies ): +def handle_next_repository_dependency( trans, key_rd_dicts_to_be_processed, all_repository_dependencies, handled_key_rd_dicts, + circular_repository_dependencies ): next_repository_key_rd_dict = key_rd_dicts_to_be_processed.pop( 0 ) next_repository_key_rd_dicts = [ next_repository_key_rd_dict ] next_repository_key = next_repository_key_rd_dict.keys()[ 0 ] diff -r 32cf6611bf3cf1249620ba265ed94ea430d9f4b1 -r aa6203b24be369697fd451e2a8dd45518d39073c lib/tool_shed/util/shed_util_common.py --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -1341,9 +1341,7 @@ """ # This method is used only in Galaxy, not the tool shed. repository_query = __repository_query( app ) - if tool_shed.find( '//' ) > 0: - tool_shed = tool_shed.split( '//' )[1] - tool_shed = tool_shed.rstrip( '/' ) + tool_shed = remove_protocol_from_tool_shed_url( tool_shed ) return repository_query \ .filter( and_( app.install_model.ToolShedRepository.table.c.tool_shed == tool_shed, app.install_model.ToolShedRepository.table.c.name == name, @@ -1597,6 +1595,12 @@ galaxy_url = trans.get_cookie( name='toolshedgalaxyurl' ) return galaxy_url +def handle_tool_shed_url_protocol( app, tool_shed_url ): + """Handle secure and insecure HTTP protocol since they may change over time.""" + tool_shed_url = remove_protocol_from_tool_shed_url( tool_shed_url ) + tool_shed_url = get_url_from_tool_shed( app, tool_shed_url ) + return tool_shed_url + def have_shed_tool_conf_for_install( trans ): if not trans.app.toolbox.shed_tool_confs: return False @@ -1653,6 +1657,12 @@ except: pass +def remove_protocol_from_tool_shed_url( tool_shed_url ): + if tool_shed_url.find( '//' ) > 0: + tool_shed_url = tool_shed_url.split( '//' )[1] + tool_shed_url = tool_shed_url.rstrip( '/' ) + return tool_shed_url + def __repository_query( app ): if app.name == "galaxy": query = app.install_model.context.query( app.install_model.ToolShedRepository ) https://bitbucket.org/galaxy/galaxy-central/commits/b37fa2ccd056/ Changeset: b37fa2ccd056 User: greg Date: 2014-04-03 23:41:18 Summary: Merged next-stable Affected #: 6 files diff -r 9fcd372f9fdbe8d6afa4aecd3d7f4f1ac2009ec8 -r b37fa2ccd056f939f3605952a6910d64490fc04c 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 @@ -137,8 +137,8 @@ action='reselect_tool_panel_section', **kwd ) ) else: - message = "Unable to get latest revision for repository <b>%s</b> from the tool shed, so repository " % str( repository.name ) - message += "reinstallation is not possible at this time." + message = "Unable to get latest revision for repository <b>%s</b> from " % str( repository.name ) + message += "the Tool Shed, so repository reinstallation is not possible at this time." status = "error" return trans.response.send_redirect( web.url_for( controller='admin_toolshed', action='browse_repositories', @@ -986,12 +986,15 @@ # The Tool Shed cannot handle the get_repository_id request, so the code must be older than the # 04/2014 Galaxy release when it was introduced. It will be safest to error out and let the # Tool Shed admin update the Tool Shed to a later release. - err_msg = 'The Tool Shed %s is running a code revision that does not ' % str( tool_shed_url) - err_msg += 'allow updating an installed repository where the updates include newly defined repository ' - err_msg += 'or tool dependency definitions, so the repository %s cannot ' % str( repository.name ) - err_msg += 'be updated at this time. Contact the Tool Shed administrator if possible and' - err_msg += 'ask if they can update the Tool Shed code to the latest release.' - return trans.show_error_message( err_msg ) + message = 'The updates available for the repository <b>%s</b> ' % str( repository.name ) + message += 'include newly defined repository or tool dependency definitions, and attempting ' + message += 'to update the repository resulted in the following error. Contact the Tool Shed ' + message += 'administrator if necessary.<br/>%s' % str( e ) + status = 'error' + return trans.response.send_redirect( web.url_for( controller='admin_toolshed', + action='browse_repositories', + message=message, + status=status ) ) changeset_revisions = updating_to_changeset_revision else: changeset_revisions = kwd.get( 'changeset_revisions', None ) @@ -1811,7 +1814,7 @@ """Update a cloned repository to the latest revision possible.""" message = kwd.get( 'message', '' ) status = kwd.get( 'status', 'done' ) - tool_shed_url = kwd[ 'tool_shed_url' ] + tool_shed_url = kwd.get( 'tool_shed_url', None ) name = kwd.get( 'name', None ) owner = kwd.get( 'owner', None ) changeset_revision = kwd.get( 'changeset_revision', None ) diff -r 9fcd372f9fdbe8d6afa4aecd3d7f4f1ac2009ec8 -r b37fa2ccd056f939f3605952a6910d64490fc04c lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -2535,18 +2535,19 @@ repository_metadata_id = trans.security.encode_id( repository_metadata.id ), metadata = repository_metadata.metadata # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. + toolshed_base_url = str( web.url_for( '/', qualified=True ) ).rstrip( '/' ) repository_dependencies = \ repository_dependency_util.get_repository_dependencies_for_changeset_revision( trans=trans, repository=repository, repository_metadata=repository_metadata, - toolshed_base_url=str( web.url_for( '/', qualified=True ) ).rstrip( '/' ), + toolshed_base_url=toolshed_base_url, key_rd_dicts_to_be_processed=None, all_repository_dependencies=None, handled_key_rd_dicts=None ) if metadata: if 'repository_dependencies' in metadata and not repository_dependencies: - # See if we have an invalid repository dependency definition or if the repository dependency is required only for compiling the - # repository's tool dependency. + # See if we have an invalid repository dependency definition or if the repository dependency is required + # only for compiling the repository's tool dependency. invalid = False repository_dependencies_dict = metadata[ 'repository_dependencies' ] rd_tups = repository_dependencies_dict.get( 'repository_dependencies', [] ) diff -r 9fcd372f9fdbe8d6afa4aecd3d7f4f1ac2009ec8 -r b37fa2ccd056f939f3605952a6910d64490fc04c lib/tool_shed/util/commit_util.py --- a/lib/tool_shed/util/commit_util.py +++ b/lib/tool_shed/util/commit_util.py @@ -138,8 +138,8 @@ def handle_complex_repository_dependency_elem( trans, elem, sub_elem_index, sub_elem, sub_elem_altered, altered, unpopulate=False ): """ - Populate or unpopulate the toolshed and changeset_revision attributes of a <repository> tag that defines a complex repository - dependency. + Populate or unpopulate the toolshed and changeset_revision attributes of a <repository> tag that defines + a complex repository dependency. """ # The received sub_elem looks something like the following: # <repository name="package_eigen_2_0" owner="test" prior_installation_required="True" /> @@ -153,15 +153,16 @@ altered = True return altered, sub_elem_altered, elem, error_message -def handle_directory_changes( trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, commit_message, - undesirable_dirs_removed, undesirable_files_removed ): +def handle_directory_changes( trans, repository, full_path, filenames_in_archive, remove_repo_files_not_in_tar, new_repo_alert, + commit_message, undesirable_dirs_removed, undesirable_files_removed ): repo_dir = repository.repo_path( trans.app ) repo = hg.repository( suc.get_configured_ui(), repo_dir ) content_alert_str = '' files_to_remove = [] filenames_in_archive = [ os.path.join( full_path, name ) for name in filenames_in_archive ] if remove_repo_files_not_in_tar and not repository.is_new( trans.app ): - # We have a repository that is not new (it contains files), so discover those files that are in the repository, but not in the uploaded archive. + # We have a repository that is not new (it contains files), so discover those files that are in the + # repository, but not in the uploaded archive. for root, dirs, files in os.walk( full_path ): if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0: for undesirable_dir in UNDESIRABLE_DIRS: @@ -413,9 +414,10 @@ # <install version="1.0"> for actions_index, actions_elem in enumerate( package_elem ): if actions_elem.tag == 'actions_group': - # Inspect all entries in the <actions_group> tag set, skipping <actions> tag sets that define os and architecture - # attributes. We want to inspect only the last <actions> tag set contained within the <actions_group> tag set to - # see if a complex repository dependency is defined. + # Inspect all entries in the <actions_group> tag set, skipping <actions> + # tag sets that define os and architecture attributes. We want to inspect + # only the last <actions> tag set contained within the <actions_group> tag + # set to see if a complex repository dependency is defined. for actions_group_index, actions_group_elem in enumerate( actions_elem ): if actions_group_elem.tag == 'actions': # Skip all actions tags that include os or architecture attributes. diff -r 9fcd372f9fdbe8d6afa4aecd3d7f4f1ac2009ec8 -r b37fa2ccd056f939f3605952a6910d64490fc04c lib/tool_shed/util/export_util.py --- a/lib/tool_shed/util/export_util.py +++ b/lib/tool_shed/util/export_util.py @@ -228,11 +228,12 @@ repository = suc.get_repository_in_tool_shed( trans, repository_id ) repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision ) # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. + toolshed_base_url = str( web.url_for( '/', qualified=True ) ).rstrip( '/' ) repository_dependencies = \ repository_dependency_util.get_repository_dependencies_for_changeset_revision( trans=trans, repository=repository, repository_metadata=repository_metadata, - toolshed_base_url=str( web.url_for( '/', qualified=True ) ).rstrip( '/' ), + toolshed_base_url=toolshed_base_url, key_rd_dicts_to_be_processed=None, all_repository_dependencies=None, handled_key_rd_dicts=None ) diff -r 9fcd372f9fdbe8d6afa4aecd3d7f4f1ac2009ec8 -r b37fa2ccd056f939f3605952a6910d64490fc04c lib/tool_shed/util/repository_dependency_util.py --- a/lib/tool_shed/util/repository_dependency_util.py +++ b/lib/tool_shed/util/repository_dependency_util.py @@ -106,6 +106,8 @@ only those items contained in the received repo_info_dicts list will be processed. """ log.debug( "Creating repository dependency objects..." ) + # Handle secure and insecure protocol since it may change over time. + tool_shed_url = suc.handle_tool_shed_url_protocol( trans.app, tool_shed_url ) # The following list will be maintained within this method to contain all created or updated tool shed repositories, # including repository dependencies that may not be installed. all_created_or_updated_tool_shed_repositories = [] @@ -293,8 +295,8 @@ def get_repository_dependencies_for_installed_tool_shed_repository( trans, repository ): """ - Send a request to the appropriate tool shed to retrieve the dictionary of repository dependencies defined for the received repository which is - installed into Galaxy. This method is called only from Galaxy. + Send a request to the appropriate tool shed to retrieve the dictionary of repository dependencies defined + for the received repository which is installed into Galaxy. This method is called only from Galaxy. """ tool_shed_url = suc.get_url_from_tool_shed( trans.app, repository.tool_shed ) url = suc.url_join( tool_shed_url, @@ -565,12 +567,13 @@ key_rd_dicts_to_be_processed = remove_from_key_rd_dicts( key_rd_dict, key_rd_dicts_to_be_processed ) else: # The repository is in a different tool shed, so build an url and send a request. - error_message = "Repository dependencies are currently supported only within the same tool shed. Ignoring repository dependency definition " + error_message = "Repository dependencies are currently supported only within the same Tool Shed. Ignoring repository dependency definition " error_message += "for tool shed %s, name %s, owner %s, changeset revision %s" % ( toolshed, name, owner, changeset_revision ) log.debug( error_message ) return toolshed, required_repository, required_repository_metadata, repository_key_rd_dicts, key_rd_dicts_to_be_processed, handled_key_rd_dicts -def handle_next_repository_dependency( trans, key_rd_dicts_to_be_processed, all_repository_dependencies, handled_key_rd_dicts, circular_repository_dependencies ): +def handle_next_repository_dependency( trans, key_rd_dicts_to_be_processed, all_repository_dependencies, handled_key_rd_dicts, + circular_repository_dependencies ): next_repository_key_rd_dict = key_rd_dicts_to_be_processed.pop( 0 ) next_repository_key_rd_dicts = [ next_repository_key_rd_dict ] next_repository_key = next_repository_key_rd_dict.keys()[ 0 ] diff -r 9fcd372f9fdbe8d6afa4aecd3d7f4f1ac2009ec8 -r b37fa2ccd056f939f3605952a6910d64490fc04c lib/tool_shed/util/shed_util_common.py --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -1341,9 +1341,7 @@ """ # This method is used only in Galaxy, not the tool shed. repository_query = __repository_query( app ) - if tool_shed.find( '//' ) > 0: - tool_shed = tool_shed.split( '//' )[1] - tool_shed = tool_shed.rstrip( '/' ) + tool_shed = remove_protocol_from_tool_shed_url( tool_shed ) return repository_query \ .filter( and_( app.install_model.ToolShedRepository.table.c.tool_shed == tool_shed, app.install_model.ToolShedRepository.table.c.name == name, @@ -1597,6 +1595,12 @@ galaxy_url = trans.get_cookie( name='toolshedgalaxyurl' ) return galaxy_url +def handle_tool_shed_url_protocol( app, tool_shed_url ): + """Handle secure and insecure HTTP protocol since they may change over time.""" + tool_shed_url = remove_protocol_from_tool_shed_url( tool_shed_url ) + tool_shed_url = get_url_from_tool_shed( app, tool_shed_url ) + return tool_shed_url + def have_shed_tool_conf_for_install( trans ): if not trans.app.toolbox.shed_tool_confs: return False @@ -1653,6 +1657,12 @@ except: pass +def remove_protocol_from_tool_shed_url( tool_shed_url ): + if tool_shed_url.find( '//' ) > 0: + tool_shed_url = tool_shed_url.split( '//' )[1] + tool_shed_url = tool_shed_url.rstrip( '/' ) + return tool_shed_url + def __repository_query( app ): if app.name == "galaxy": query = app.install_model.context.query( app.install_model.ToolShedRepository ) 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.