commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/434254daaa09/ Changeset: 434254daaa09 Branch: next-stable User: greg Date: 2013-10-23 22:30:35 Summary: Handle automatic population of the toolshed and changeset_revision attributes of <repository> tags defined as subelements of any actions tag type in tool dependency definitions. Affected #: 2 files diff -r 41b2bb55771864d5a70bcf1c10f82da22874a6f8 -r 434254daaa091f4b9999e015ff090da518327a13 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 @@ -502,7 +502,6 @@ pre_cmd = './configure %s && make && make install' % configure_opts else: pre_cmd = './configure prefix=$INSTALL_DIR %s && make && make install' % configure_opts - cmd = install_environment.build_command( td_common_util.evaluate_template( pre_cmd, install_dir ) ) return_code = handle_command( app, tool_dependency, install_dir, cmd ) if return_code: diff -r 41b2bb55771864d5a70bcf1c10f82da22874a6f8 -r 434254daaa091f4b9999e015ff090da518327a13 lib/tool_shed/util/commit_util.py --- a/lib/tool_shed/util/commit_util.py +++ b/lib/tool_shed/util/commit_util.py @@ -318,22 +318,23 @@ error_message = 'Unable to locate repository with name %s and owner %s. ' % ( str( name ), str( owner ) ) return revised, elem, error_message -def handle_set_environment_for_install( trans, package_altered, altered, actions_elem, action_index, action_elem, unpopulate=False ): +def handle_repository_dependency_sub_elem( trans, package_altered, altered, actions_elem, action_index, action_elem, unpopulate=False ): + # This method populates the toolshed and changeset_revision attributes for each of the following. # <action type="set_environment_for_install"> - # <repository name="package_eigen_2_0" owner="test" changeset_revision="09eb05087cd0"> - # <package name="eigen" version="2.0.17" /> - # </repository> - # </action> + # <action type="setup_r_environment"> + # <action type="setup_ruby_environment"> for repo_index, repo_elem in enumerate( action_elem ): - revised, repository_elem, error_message = handle_repository_dependency_elem( trans, repo_elem, unpopulate=unpopulate ) - if error_message: - exception_message = 'The tool_dependencies.xml file contains an invalid <repository> tag. %s' % error_message - raise Exception( exception_message ) - if revised: - action_elem[ repo_index ] = repository_elem - package_altered = True - if not altered: - altered = True + # Make sure to skip comments and tags that are not <repository>. + if repo_elem.tag == 'repository': + revised, repository_elem, error_message = handle_repository_dependency_elem( trans, repo_elem, unpopulate=unpopulate ) + if error_message: + exception_message = 'The tool_dependencies.xml file contains an invalid <repository> tag. %s' % error_message + raise Exception( exception_message ) + if revised: + action_elem[ repo_index ] = repository_elem + package_altered = True + if not altered: + altered = True if package_altered: actions_elem[ action_index ] = action_elem return package_altered, altered, actions_elem @@ -402,29 +403,28 @@ last_actions_elem[ last_actions_elem_package_index ] = last_actions_elem_package_elem actions_group_elem[ last_actions_index ] = last_actions_elem else: - last_actions_elem_action_type = last_actions_elem.get( 'type' ) - if last_actions_elem_action_type == 'set_environment_for_install': - last_actions_package_altered, altered, last_actions_elem = \ - handle_set_environment_for_install( trans, - last_actions_package_altered, - altered, - actions_group_elem, - last_actions_index, - last_actions_elem, - unpopulate=unpopulate ) + # Inspect the sub elements of last_actions_elem to locate all <repository> tags and + # populate them with toolshed and changeset_revision attributes if necessary. + last_actions_package_altered, altered, last_actions_elem = \ + handle_repository_dependency_sub_elem( trans, + last_actions_package_altered, + altered, + actions_group_elem, + last_actions_index, + last_actions_elem, + unpopulate=unpopulate ) elif actions_elem.tag == 'actions': # We are not in an <actions_group> tag set, so we must be in an <actions> tag set. for action_index, action_elem in enumerate( actions_elem ): - - action_type = action_elem.get( 'type' ) - if action_type == 'set_environment_for_install': - package_altered, altered, actions_elem = handle_set_environment_for_install( trans, - package_altered, - altered, - actions_elem, - action_index, - action_elem, - unpopulate=unpopulate ) + # Inspect the sub elements of last_actions_elem to locate all <repository> tags and populate them with + # toolshed and changeset_revision attributes if necessary. + package_altered, altered, actions_elem = handle_repository_dependency_sub_elem( trans, + package_altered, + altered, + actions_elem, + action_index, + action_elem, + unpopulate=unpopulate ) if package_altered: package_elem[ actions_index ] = actions_elem if package_altered: https://bitbucket.org/galaxy/galaxy-central/commits/aed8d5d9562f/ Changeset: aed8d5d9562f User: greg Date: 2013-10-23 22:31:03 Summary: Merged from next-stable Affected #: 2 files diff -r 7fd53ab921bc562abb96761e20bdc101df7126af -r aed8d5d9562f42596150ab086800b43bf463f270 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 @@ -502,7 +502,6 @@ pre_cmd = './configure %s && make && make install' % configure_opts else: pre_cmd = './configure prefix=$INSTALL_DIR %s && make && make install' % configure_opts - cmd = install_environment.build_command( td_common_util.evaluate_template( pre_cmd, install_dir ) ) return_code = handle_command( app, tool_dependency, install_dir, cmd ) if return_code: diff -r 7fd53ab921bc562abb96761e20bdc101df7126af -r aed8d5d9562f42596150ab086800b43bf463f270 lib/tool_shed/util/commit_util.py --- a/lib/tool_shed/util/commit_util.py +++ b/lib/tool_shed/util/commit_util.py @@ -318,22 +318,23 @@ error_message = 'Unable to locate repository with name %s and owner %s. ' % ( str( name ), str( owner ) ) return revised, elem, error_message -def handle_set_environment_for_install( trans, package_altered, altered, actions_elem, action_index, action_elem, unpopulate=False ): +def handle_repository_dependency_sub_elem( trans, package_altered, altered, actions_elem, action_index, action_elem, unpopulate=False ): + # This method populates the toolshed and changeset_revision attributes for each of the following. # <action type="set_environment_for_install"> - # <repository name="package_eigen_2_0" owner="test" changeset_revision="09eb05087cd0"> - # <package name="eigen" version="2.0.17" /> - # </repository> - # </action> + # <action type="setup_r_environment"> + # <action type="setup_ruby_environment"> for repo_index, repo_elem in enumerate( action_elem ): - revised, repository_elem, error_message = handle_repository_dependency_elem( trans, repo_elem, unpopulate=unpopulate ) - if error_message: - exception_message = 'The tool_dependencies.xml file contains an invalid <repository> tag. %s' % error_message - raise Exception( exception_message ) - if revised: - action_elem[ repo_index ] = repository_elem - package_altered = True - if not altered: - altered = True + # Make sure to skip comments and tags that are not <repository>. + if repo_elem.tag == 'repository': + revised, repository_elem, error_message = handle_repository_dependency_elem( trans, repo_elem, unpopulate=unpopulate ) + if error_message: + exception_message = 'The tool_dependencies.xml file contains an invalid <repository> tag. %s' % error_message + raise Exception( exception_message ) + if revised: + action_elem[ repo_index ] = repository_elem + package_altered = True + if not altered: + altered = True if package_altered: actions_elem[ action_index ] = action_elem return package_altered, altered, actions_elem @@ -402,29 +403,28 @@ last_actions_elem[ last_actions_elem_package_index ] = last_actions_elem_package_elem actions_group_elem[ last_actions_index ] = last_actions_elem else: - last_actions_elem_action_type = last_actions_elem.get( 'type' ) - if last_actions_elem_action_type == 'set_environment_for_install': - last_actions_package_altered, altered, last_actions_elem = \ - handle_set_environment_for_install( trans, - last_actions_package_altered, - altered, - actions_group_elem, - last_actions_index, - last_actions_elem, - unpopulate=unpopulate ) + # Inspect the sub elements of last_actions_elem to locate all <repository> tags and + # populate them with toolshed and changeset_revision attributes if necessary. + last_actions_package_altered, altered, last_actions_elem = \ + handle_repository_dependency_sub_elem( trans, + last_actions_package_altered, + altered, + actions_group_elem, + last_actions_index, + last_actions_elem, + unpopulate=unpopulate ) elif actions_elem.tag == 'actions': # We are not in an <actions_group> tag set, so we must be in an <actions> tag set. for action_index, action_elem in enumerate( actions_elem ): - - action_type = action_elem.get( 'type' ) - if action_type == 'set_environment_for_install': - package_altered, altered, actions_elem = handle_set_environment_for_install( trans, - package_altered, - altered, - actions_elem, - action_index, - action_elem, - unpopulate=unpopulate ) + # Inspect the sub elements of last_actions_elem to locate all <repository> tags and populate them with + # toolshed and changeset_revision attributes if necessary. + package_altered, altered, actions_elem = handle_repository_dependency_sub_elem( trans, + package_altered, + altered, + actions_elem, + action_index, + action_elem, + unpopulate=unpopulate ) if package_altered: package_elem[ actions_index ] = actions_elem if package_altered: 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