1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/43bfb43ed4b5/ Changeset: 43bfb43ed4b5 User: greg Date: 2013-07-12 04:06:48 Summary: Contribution from Bjorn Gruning allowing installation of a repository to progress even if a repository dependency is not available. This will handle the case where a repository depnedency's env.sh file is not available due to an error in it's installation, but if possible, the dependent repository will proceed with it's installation. Affected #: 2 files diff -r 0a6c263dd4284d3aed1b59db91c16ca5e4c4a7a0 -r 43bfb43ed4b508cfa9a611edc71caf531a0c1a2a lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py --- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py @@ -238,8 +238,11 @@ # in the set_environment action. cmds = [] for env_shell_file_path in env_shell_file_paths: - for i, env_setting in enumerate( open( env_shell_file_path ) ): - cmds.append( env_setting.strip( '\n' ) ) + if os.path.exists( env_shell_file_path ): + for env_setting in open( env_shell_file_path ): + cmds.append( env_setting.strip( '\n' ) ) + else: + log.debug( 'Invalid file %s specified, ignoring set_environment action.', env_shell_file_path ) env_var_dicts = action_dict[ 'environment_variable' ] for env_var_dict in env_var_dicts: # Check for the presence of the $ENV[] key string and populate it if possible. @@ -298,8 +301,11 @@ with settings( warn_only=True ): cmd = '' for env_shell_file_path in env_shell_file_paths: - for env_setting in open( env_shell_file_path ): - cmd += '%s\n' % env_setting + if os.path.exists( env_shell_file_path ): + for env_setting in open( env_shell_file_path ): + cmd += '%s\n' % env_setting + else: + log.debug( 'Invalid file %s specified, ignoring shell_command action.', env_shell_file_path ) cmd += action_dict[ 'command' ] return_code = handle_command( app, tool_dependency, install_dir, cmd ) if return_code: @@ -307,10 +313,13 @@ elif action_type == 'template_command': env_vars = dict() for env_shell_file_path in env_shell_file_paths: - for env_setting in open( env_shell_file_path ): - env_string = env_setting.split( ';' )[ 0 ] - env_name, env_path = env_string.split( '=' ) - env_vars[ env_name ] = env_path + if os.path.exists( env_shell_file_path ): + for env_setting in open( env_shell_file_path ): + env_string = env_setting.split( ';' )[ 0 ] + env_name, env_path = env_string.split( '=' ) + env_vars[ env_name ] = env_path + else: + log.debug( 'Invalid file %s specified, ignoring template_command action.', env_shell_file_path ) env_vars.update( common_util.get_env_var_values( install_dir ) ) language = action_dict[ 'language' ] with settings( warn_only=True, **env_vars ): diff -r 0a6c263dd4284d3aed1b59db91c16ca5e4c4a7a0 -r 43bfb43ed4b508cfa9a611edc71caf531a0c1a2a 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 @@ -177,15 +177,18 @@ tool_dependency_name=package_name, tool_dependency_version=package_version ) env_sh_file_path = os.path.join( env_sh_file_dir, 'env.sh' ) - for i, line in enumerate( open( env_sh_file_path, 'r' ) ): - env_var_dict = env_var_dicts[ i ] - action = env_var_dict.get( 'action', None ) - name = env_var_dict.get( 'name', None ) - value = env_var_dict.get( 'value', None ) - if action and name and value: - new_value = parse_env_shell_entry( action, name, value, line ) - env_var_dict[ 'value' ] = new_value - new_env_var_dicts.append( env_var_dict ) + if os.path.exists( env_sh_file_path ): + for i, line in enumerate( open( env_sh_file_path, 'r' ) ): + env_var_dict = env_var_dicts[ i ] + action = env_var_dict.get( 'action', None ) + name = env_var_dict.get( 'name', None ) + value = env_var_dict.get( 'value', None ) + if action and name and value: + new_value = parse_env_shell_entry( action, name, value, line ) + env_var_dict[ 'value' ] = new_value + new_env_var_dicts.append( env_var_dict ) + else: + log.debug( 'Invalid file %s specified, ignoring set_environment_for_install action.', env_sh_file_path ) action_dict[ 'environment_variable' ] = new_env_var_dicts else: action_dict[ 'environment_variable' ] = env_var_dicts 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.