commit/galaxy-central: greg: Don't reset the status on installed tool dependencies when getting updates from the tool shed for installed tool shed repositories.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/7aac5800197b/ changeset: 7aac5800197b user: greg date: 2012-07-11 19:45:42 summary: Don't reset the status on installed tool dependencies when getting updates from the tool shed for installed tool shed repositories. affected #: 4 files diff -r a2d1619198063084b99a1e6e8c75e1658593c448 -r 7aac5800197b4ad9fc8d76350b744d5e795e31cc lib/galaxy/tool_shed/install_manager.py --- a/lib/galaxy/tool_shed/install_manager.py +++ b/lib/galaxy/tool_shed/install_manager.py @@ -138,7 +138,7 @@ self.app.sa_session.flush() if 'tool_dependencies' in metadata_dict: # All tool_dependency objects must be created before the tools are processed even if no tool dependencies will be installed. - tool_dependencies = create_tool_dependency_objects( self.app, tool_shed_repository, tool_shed_repository.installed_changeset_revision ) + tool_dependencies = create_tool_dependency_objects( self.app, tool_shed_repository, tool_shed_repository.installed_changeset_revision, set_status=True ) else: tool_dependencies = None if 'tools' in metadata_dict: diff -r a2d1619198063084b99a1e6e8c75e1658593c448 -r 7aac5800197b4ad9fc8d76350b744d5e795e31cc lib/galaxy/tool_shed/tool_dependencies/install_util.py --- a/lib/galaxy/tool_shed/tool_dependencies/install_util.py +++ b/lib/galaxy/tool_shed/tool_dependencies/install_util.py @@ -11,13 +11,14 @@ from elementtree import ElementTree, ElementInclude from elementtree.ElementTree import Element, SubElement -def create_or_update_tool_dependency( app, tool_shed_repository, name, version, type, status ): +def create_or_update_tool_dependency( app, tool_shed_repository, name, version, type, status, set_status=True ): # Called from Galaxy (never the tool shed) when a new repository is being installed or when an uninstalled repository is being reinstalled. sa_session = app.model.context.current # First see if an appropriate tool_dependency record exists for the received tool_shed_repository. tool_dependency = get_tool_dependency_by_name_version_type_repository( app, tool_shed_repository, name, version, type ) if tool_dependency: - tool_dependency.status = status + if set_status: + tool_dependency.status = status else: # Create a new tool_dependency record for the tool_shed_repository. tool_dependency = app.model.ToolDependency( tool_shed_repository.id, name, version, type, status ) @@ -59,7 +60,8 @@ name=package_name, version=package_version, type='package', - status=app.model.ToolDependency.installation_status.INSTALLING ) + status=app.model.ToolDependency.installation_status.INSTALLING, + set_status=True ) if package_install_version == '1.0': # Handle tool dependency installation using a fabric method included in the Galaxy framework. for actions_elem in package_elem: diff -r a2d1619198063084b99a1e6e8c75e1658593c448 -r 7aac5800197b4ad9fc8d76350b744d5e795e31cc lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -380,7 +380,7 @@ sa_session.add( tool_shed_repository ) sa_session.flush() return tool_shed_repository -def create_tool_dependency_objects( app, tool_shed_repository, current_changeset_revision ): +def create_tool_dependency_objects( app, tool_shed_repository, current_changeset_revision, set_status=True ): # Create or update a ToolDependency for each entry in tool_dependencies_config. This method is called when installing a new tool_shed_repository. tool_dependency_objects = [] work_dir = make_tmp_directory() @@ -404,7 +404,8 @@ name=package_name, version=package_version, type='package', - status=app.model.ToolDependency.installation_status.NEVER_INSTALLED ) + status=app.model.ToolDependency.installation_status.NEVER_INSTALLED, + set_status=set_status ) tool_dependency_objects.append( tool_dependency ) try: shutil.rmtree( work_dir ) diff -r a2d1619198063084b99a1e6e8c75e1658593c448 -r 7aac5800197b4ad9fc8d76350b744d5e795e31cc lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -688,7 +688,7 @@ trans.sa_session.add( tool_shed_repository ) trans.sa_session.flush() if 'tool_dependencies' in metadata_dict and not reinstalling: - tool_dependencies = create_tool_dependency_objects( trans.app, tool_shed_repository, tool_shed_repository.installed_changeset_revision ) + tool_dependencies = create_tool_dependency_objects( trans.app, tool_shed_repository, tool_shed_repository.installed_changeset_revision, set_status=True ) if 'tools' in metadata_dict: tool_panel_dict = generate_tool_panel_dict_for_new_install( metadata_dict[ 'tools' ], tool_section ) repository_tools_tups = get_repository_tools_tups( trans.app, metadata_dict ) @@ -1480,7 +1480,7 @@ trans.sa_session.flush() # Create tool_dependency records if necessary. if 'tool_dependencies' in metadata_dict: - tool_dependencies = create_tool_dependency_objects( trans.app, repository, repository.changeset_revision ) + tool_dependencies = create_tool_dependency_objects( trans.app, repository, repository.changeset_revision, set_status=False ) message = "The installed repository named '%s' has been updated to change set revision '%s'. " % ( name, latest_changeset_revision ) # See if any tool dependencies can be installed. shed_tool_conf, tool_path, relative_install_dir = get_tool_panel_config_tool_path_install_dir( trans.app, repository ) 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)
-
Bitbucket