1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/71c3b867efd1/ changeset: 71c3b867efd1 user: greg date: 2012-12-11 17:37:53 summary: Fix for resetting all metadata on a tool shed repository. affected #: 1 file
diff -r 1cdb5f5eb6d061b3232c4f7725839a9fe287355a -r 71c3b867efd1d8074a59659ed7320c1e6a3d9ed3 lib/galaxy/util/shed_util_common.py --- a/lib/galaxy/util/shed_util_common.py +++ b/lib/galaxy/util/shed_util_common.py @@ -726,7 +726,7 @@ relative_path, filename = os.path.split( sample_file ) if filename == 'tool_data_table_conf.xml.sample': new_table_elems, error_message = app.tool_data_tables.add_new_entries_from_config_file( config_filename=sample_file, - tool_data_path=original_tool_data_path, + tool_data_path=app.config.tool_data_path, shed_tool_data_table_config=app.config.shed_tool_data_table_config, persist=persist ) if error_message: @@ -771,7 +771,7 @@ if not valid: invalid_file_tups.append( ( name, error_message ) ) else: - invalid_files_and_errors_tups = check_tool_input_params( app, files_dir, name, tool, sample_file_metadata_paths ) + invalid_files_and_errors_tups = check_tool_input_params( app, files_dir, name, tool, sample_file_copy_paths ) can_set_metadata = True for tup in invalid_files_and_errors_tups: if name in tup: @@ -1329,32 +1329,32 @@ relative_path_to_file.startswith( os.path.join( shed_config_dict.get( 'tool_path' ), relative_install_dir ) ): relative_path_to_file = relative_path_to_file[ len( shed_config_dict.get( 'tool_path' ) ) + 1: ] return relative_path_to_file -def get_sample_files_from_disk( repository_files_dir, tool_path = None, relative_install_dir=None, resetting_all_metadata_on_repository=False ): +def get_sample_files_from_disk( repository_files_dir, tool_path=None, relative_install_dir=None, resetting_all_metadata_on_repository=False ): if resetting_all_metadata_on_repository: # Keep track of the location where the repository is temporarily cloned so that we can strip it when setting metadata. work_dir = repository_files_dir sample_file_metadata_paths = [] sample_file_copy_paths = [] for root, dirs, files in os.walk( repository_files_dir ): - if root.find( '.hg' ) < 0: - for name in files: - if name.endswith( '.sample' ): - if resetting_all_metadata_on_repository: - full_path_to_sample_file = os.path.join( root, name ) - stripped_path_to_sample_file = full_path_to_sample_file.replace( work_dir, '' ) - if stripped_path_to_sample_file.startswith( '/' ): - stripped_path_to_sample_file = stripped_path_to_sample_file[ 1: ] - relative_path_to_sample_file = os.path.join( relative_install_dir, stripped_path_to_sample_file ) - if os.path.exists( relative_path_to_sample_file ): - sample_file_copy_paths.append( relative_path_to_sample_file ) - else: - sample_file_copy_paths.append( full_path_to_sample_file ) + if root.find( '.hg' ) < 0: + for name in files: + if name.endswith( '.sample' ): + if resetting_all_metadata_on_repository: + full_path_to_sample_file = os.path.join( root, name ) + stripped_path_to_sample_file = full_path_to_sample_file.replace( work_dir, '' ) + if stripped_path_to_sample_file.startswith( '/' ): + stripped_path_to_sample_file = stripped_path_to_sample_file[ 1: ] + relative_path_to_sample_file = os.path.join( relative_install_dir, stripped_path_to_sample_file ) + if os.path.exists( relative_path_to_sample_file ): + sample_file_copy_paths.append( relative_path_to_sample_file ) else: - relative_path_to_sample_file = os.path.join( root, name ) - sample_file_copy_paths.append( relative_path_to_sample_file ) - if tool_path and relative_install_dir: - if relative_path_to_sample_file.startswith( os.path.join( tool_path, relative_install_dir ) ): - relative_path_to_sample_file = relative_path_to_sample_file[ len( tool_path ) + 1 :] + sample_file_copy_paths.append( full_path_to_sample_file ) + else: + relative_path_to_sample_file = os.path.join( root, name ) + sample_file_copy_paths.append( relative_path_to_sample_file ) + if tool_path and relative_install_dir: + if relative_path_to_sample_file.startswith( os.path.join( tool_path, relative_install_dir ) ): + relative_path_to_sample_file = relative_path_to_sample_file[ len( tool_path ) + 1 :] sample_file_metadata_paths.append( relative_path_to_sample_file ) return sample_file_metadata_paths, sample_file_copy_paths def get_updated_changeset_revisions_for_repository_dependencies( trans, key_rd_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.
galaxy-commits@lists.galaxyproject.org