commit/galaxy-central: inithello: Don't sync the filesystem with the database when running a tool migration install script.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/9b337a87d6ec/ Changeset: 9b337a87d6ec User: inithello Date: 2014-01-24 22:38:43 Summary: Don't sync the filesystem with the database when running a tool migration install script. Affected #: 6 files diff -r cce4687a7ccc56a47db95498b0ae86f0f5986125 -r 9b337a87d6eca3bf9f7448d49337d231e3b4582b 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 @@ -445,7 +445,8 @@ installed_tool_dependencies = common_install_util.handle_tool_dependencies( app=trans.app, tool_shed_repository=tool_shed_repository, tool_dependencies_config=tool_dependencies_config, - tool_dependencies=tool_dependencies ) + tool_dependencies=tool_dependencies, + from_install_manager=False ) for installed_tool_dependency in installed_tool_dependencies: if installed_tool_dependency.status == trans.app.install_model.ToolDependency.installation_status.ERROR: text = util.unicodify( installed_tool_dependency.error_message ) diff -r cce4687a7ccc56a47db95498b0ae86f0f5986125 -r 9b337a87d6eca3bf9f7448d49337d231e3b4582b lib/tool_shed/galaxy_install/install_manager.py --- a/lib/tool_shed/galaxy_install/install_manager.py +++ b/lib/tool_shed/galaxy_install/install_manager.py @@ -440,7 +440,8 @@ installed_tool_dependencies = common_install_util.handle_tool_dependencies( app=self.app, tool_shed_repository=tool_shed_repository, tool_dependencies_config=tool_dependencies_config, - tool_dependencies=tool_dependencies ) + tool_dependencies=tool_dependencies, + from_install_manager=True ) for installed_tool_dependency in installed_tool_dependencies: if installed_tool_dependency.status == self.app.install_model.ToolDependency.installation_status.ERROR: print '\nThe following error occurred from the InstallManager while installing tool dependency ', installed_tool_dependency.name, ':' diff -r cce4687a7ccc56a47db95498b0ae86f0f5986125 -r 9b337a87d6eca3bf9f7448d49337d231e3b4582b lib/tool_shed/galaxy_install/repository_util.py --- a/lib/tool_shed/galaxy_install/repository_util.py +++ b/lib/tool_shed/galaxy_install/repository_util.py @@ -596,7 +596,8 @@ installed_tool_dependencies = common_install_util.handle_tool_dependencies( app=trans.app, tool_shed_repository=tool_shed_repository, tool_dependencies_config=tool_dependencies_config, - tool_dependencies=tool_shed_repository.tool_dependencies ) + tool_dependencies=tool_shed_repository.tool_dependencies, + from_install_manager=False ) suc.remove_dir( work_dir ) suc.update_tool_shed_repository_status( trans.app, tool_shed_repository, @@ -841,7 +842,8 @@ installed_tool_dependencies = common_install_util.handle_tool_dependencies( app=trans.app, tool_shed_repository=repository, tool_dependencies_config=tool_dependencies_config, - tool_dependencies=repository.tool_dependencies ) + tool_dependencies=repository.tool_dependencies, + from_install_manager=False ) for installed_tool_dependency in installed_tool_dependencies: if installed_tool_dependency.status in [ trans.install_model.ToolDependency.installation_status.ERROR ]: repair_dict = add_repair_dict_entry( repository.name, installed_tool_dependency.error_message ) diff -r cce4687a7ccc56a47db95498b0ae86f0f5986125 -r 9b337a87d6eca3bf9f7448d49337d231e3b4582b 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 @@ -285,7 +285,7 @@ tool_dependency = tool_dependency_util.mark_tool_dependency_installed( app, tool_dependency ) return tool_dependency -def install_package( app, elem, tool_shed_repository, tool_dependencies=None ): +def install_package( app, elem, tool_shed_repository, tool_dependencies=None, from_install_manager=False ): # The value of tool_dependencies is a partial or full list of ToolDependency records associated with the tool_shed_repository. sa_session = app.install_model.context tool_dependency = None @@ -317,14 +317,16 @@ tool_dependency_version=package_version ) can_install_tool_dependency = True if os.path.exists( install_dir ): - # Notice that we'll throw away the following tool_dependency if it can be installed. - tool_dependency, can_install_tool_dependency = \ - tool_dependency_util.sync_database_with_file_system( app, - tool_shed_repository, - package_name, - package_version, - install_dir, - tool_dependency_type='package' ) + if not from_install_manager: + # Notice that we'll throw away the following tool_dependency if it can be installed. + print 'Calling sync_database_with_file_system 2' + tool_dependency, can_install_tool_dependency = \ + tool_dependency_util.sync_database_with_file_system( app, + tool_shed_repository, + package_name, + package_version, + install_dir, + tool_dependency_type='package' ) else: can_install_tool_dependency = True if can_install_tool_dependency: diff -r cce4687a7ccc56a47db95498b0ae86f0f5986125 -r 9b337a87d6eca3bf9f7448d49337d231e3b4582b lib/tool_shed/util/common_install_util.py --- a/lib/tool_shed/util/common_install_util.py +++ b/lib/tool_shed/util/common_install_util.py @@ -435,7 +435,7 @@ all_required_repo_info_dict[ 'all_repo_info_dicts' ] = all_repo_info_dicts return all_required_repo_info_dict -def handle_tool_dependencies( app, tool_shed_repository, tool_dependencies_config, tool_dependencies ): +def handle_tool_dependencies( app, tool_shed_repository, tool_dependencies_config, tool_dependencies, from_install_manager=False ): """ Install and build tool dependencies defined in the tool_dependencies_config. This config's tag sets can currently refer to installation methods in Galaxy's tool_dependencies module. In the future, proprietary fabric scripts contained in the repository will be supported. @@ -487,7 +487,11 @@ error_message=None, remove_from_disk=False ) else: - tool_dependency = install_package( app, elem, tool_shed_repository, tool_dependencies=tool_dependencies ) + tool_dependency = install_package( app, + elem, + tool_shed_repository, + tool_dependencies=tool_dependencies, + from_install_manager=from_install_manager ) except Exception, e: error_message = "Error installing tool dependency %s version %s: %s" % ( str( package_name ), str( package_version ), str( e ) ) log.exception( error_message ) diff -r cce4687a7ccc56a47db95498b0ae86f0f5986125 -r 9b337a87d6eca3bf9f7448d49337d231e3b4582b lib/tool_shed/util/common_util.py --- a/lib/tool_shed/util/common_util.py +++ b/lib/tool_shed/util/common_util.py @@ -91,9 +91,9 @@ file_path = elem.get( 'file', None ) if file_path: path, name = os.path.split( file_path ) - if name in migrated_tool_configs_dict: - tool_dependencies = migrated_tool_configs_dict[ name ] - missing_tool_configs_dict[ name ] = tool_dependencies + for migrated_tool_config in migrated_tool_configs_dict.keys(): + if migrated_tool_config in [ file_path, name ]: + missing_tool_configs_dict[ name ] = migrated_tool_configs_dict[ migrated_tool_config ] return missing_tool_configs_dict def get_non_shed_tool_panel_configs( app ): 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