1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/9e0362d990f8/ Changeset: 9e0362d990f8 User: greg Date: 2014-05-06 15:24:36 Summary: Back out the changes in 41bb600 that resulted in changes to the way the Tool Shed's package installation framework handled dependencies that are contained in the same repository as tools that require them. Affected #: 2 files diff -r 8e6cda4c1b3d1685a8ce07412dc542f34eb8b44b -r 9e0362d990f88502b77211d2d3f7f5459123f52c lib/tool_shed/galaxy_install/tool_dependencies/install_util.py --- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py @@ -289,55 +289,6 @@ raise Exception( message ) return handled_tool_dependencies -def handle_env_vars_for_set_environment_tool_dependency( app, tool_shed_repository, tool_shed_repository_install_dir ): - env_var_name = 'PATH' - install_dir = \ - tool_dependency_util.get_tool_dependency_install_dir( app=app, - repository_name=tool_shed_repository.name, - repository_owner=tool_shed_repository.owner, - repository_changeset_revision=tool_shed_repository.installed_changeset_revision, - tool_dependency_type='set_environment', - tool_dependency_name=env_var_name, - tool_dependency_version=None ) - env_var_dict = dict( name=env_var_name, action='prepend_to', value=tool_shed_repository_install_dir ) - if not os.path.exists( install_dir ): - os.makedirs( install_dir ) - status = app.install_model.ToolDependency.installation_status.INSTALLING - tool_dependency = \ - tool_dependency_util.create_or_update_tool_dependency( app=app, - tool_shed_repository=tool_shed_repository, - name=env_var_name, - version=None, - type='set_environment', - status=status, - set_status=True ) - env_file_builder = EnvFileBuilder( install_dir ) - return_code = env_file_builder.append_line( make_executable=True, **env_var_dict ) - if return_code: - error_message = 'Error creating env.sh file for tool dependency %s, return_code: %s' % \ - ( str( tool_dependency.name ), str( return_code ) ) - log.debug( error_message ) - status = app.install_model.ToolDependency.installation_status.ERROR - tool_dependency = \ - tool_dependency_util.set_tool_dependency_attributes( app, - tool_dependency=tool_dependency, - status=status, - error_message=error_message, - remove_from_disk=False ) - else: - if tool_dependency.status not in [ app.install_model.ToolDependency.installation_status.ERROR, - app.install_model.ToolDependency.installation_status.INSTALLED ]: - status = app.install_model.ToolDependency.installation_status.INSTALLED - tool_dependency = \ - tool_dependency_util.set_tool_dependency_attributes( app, - tool_dependency=tool_dependency, - status=status, - error_message=None, - remove_from_disk=False ) - log.debug( 'Environment variable %s set in %s for tool dependency %s.' % \ - ( str( env_var_name ), str( install_dir ), str( tool_dependency.name ) ) ) - return tool_dependency - def install_and_build_package_via_fabric( app, tool_shed_repository, tool_dependency, actions_dict ): sa_session = app.install_model.context try: @@ -700,7 +651,6 @@ tool_dependencies = [] env_var_version = elem.get( 'version', '1.0' ) tool_shed_repository_install_dir = fabric_util.get_tool_shed_repository_install_dir( app, tool_shed_repository ) - tool_shed_repository_install_dir_added_to_path = False for env_var_elem in elem: # Althoug we're in a loop here, this method will always return only a single ToolDependency or None. env_var_name = env_var_elem.get( 'name', None ) @@ -771,16 +721,6 @@ status=status, error_message=error_message, remove_from_disk=False ) - if tool_dependency.status != app.install_model.ToolDependency.installation_status.ERROR: - if env_var_dict[ 'name' ] == 'PATH' and \ - env_var_dict[ 'action' ] in [ 'prepend_to', 'set_to', 'append_to' ] and \ - env_var_dict[ 'value' ] == install_environment.tool_shed_repository_install_dir: - tool_shed_repository_install_dir_added_to_path = True - tool_dependencies.append( tool_dependency ) - if not tool_shed_repository_install_dir_added_to_path: - tool_dependency = handle_env_vars_for_set_environment_tool_dependency( app, - tool_shed_repository, - tool_shed_repository_install_dir ) tool_dependencies.append( tool_dependency ) return tool_dependencies diff -r 8e6cda4c1b3d1685a8ce07412dc542f34eb8b44b -r 9e0362d990f88502b77211d2d3f7f5459123f52c lib/tool_shed/util/metadata_util.py --- a/lib/tool_shed/util/metadata_util.py +++ b/lib/tool_shed/util/metadata_util.py @@ -23,7 +23,6 @@ from tool_shed.galaxy_install.tool_dependencies import install_util from tool_shed.galaxy_install.tool_dependencies import td_common_util import tool_shed.repository_types.util as rt_util -from xml.etree import ElementTree as XmlET eggs.require( 'mercurial' ) @@ -922,28 +921,8 @@ invalid_tool_dependencies_dict = {} valid_repository_dependency_tups = [] invalid_repository_dependency_tups = [] - needs_set_environment_tool_dependency_for_path = False tools_metadata = metadata_dict.get( 'tools', None ) - if tools_metadata is not None: - for tools_dict in tools_metadata: - requirements = tools_dict.get( 'requirements', None ) - if requirements is not None: - for requirements_dict in requirements: - if requirements_dict[ 'type' ] == 'set_environment' and requirements_dict[ 'name' ] == 'PATH': - needs_set_environment_tool_dependency_for_path = True - break description = root.get( 'description' ) - if needs_set_environment_tool_dependency_for_path: - # Add this to the in-memory XML tree that is parsed to determine the database tool dependency records. This will not - # modify the on-disk tool dependency definitions, but is needed in order for the tool to correctly source the env.sh - # file that was generated for the PATH variable. - # <set_environment version="1.0"> - # <environment_variable action="prepend_to" name="PATH">$REPOSITORY_INSTALL_DIR</environment_variable> - # </set_environment> - env_var_elem_attributes = dict( name='PATH', action='prepend_to' ) - set_environment_elem = xml_util.create_element( 'set_environment', attributes=dict( version='1.0' ) ) - XmlET.SubElement( set_environment_elem, 'environment_variable', attrib=env_var_elem_attributes ) - root.append( set_environment_elem ) for elem in root: if elem.tag == 'package': valid_tool_dependencies_dict, invalid_tool_dependencies_dict, repository_dependency_tup, repository_dependency_is_valid, message = \ 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.