commit/galaxy-central: greg: Fix for exporting repositories that contain package recipes that define additional packages needed only for compiling the dependent package.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/e45ed2368920/ Changeset: e45ed2368920 User: greg Date: 2014-07-23 22:19:39 Summary: Fix for exporting repositories that contain package recipes that define additional packages needed only for compiling the dependent package. Affected #: 3 files diff -r b08a47eb8c3c15022b9e3f7d9990d40fd0fa70c0 -r e45ed2368920315ab1f9cfe28d81e07cefc5c955 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -1262,7 +1262,11 @@ repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans.app, repository_id, changeset_revision ) metadata = repository_metadata.metadata toolshed_base_url = str( web.url_for( '/', qualified=True ) ).rstrip( '/' ) + # Initialize the repository dependency RelationBuilder. rb = relation_builder.RelationBuilder( trans.app, repository, repository_metadata, toolshed_base_url ) + # Work-around to ensure repositories that contain packages needed only for compiling + # a dependent package are included in the capsule. + rb.set_filter_dependencies_needed_for_compiling( False ) # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. repository_dependencies = rb.get_repository_dependencies_for_changeset_revision() if repository_dependencies: diff -r b08a47eb8c3c15022b9e3f7d9990d40fd0fa70c0 -r e45ed2368920315ab1f9cfe28d81e07cefc5c955 lib/tool_shed/capsule/capsule_manager.py --- a/lib/tool_shed/capsule/capsule_manager.py +++ b/lib/tool_shed/capsule/capsule_manager.py @@ -245,9 +245,13 @@ repository_metadata = suc.get_repository_metadata_by_changeset_revision( self.app, self.repository_id, self.changeset_revision ) - # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. + # Get a dictionary of all repositories upon which the contents of the current + # repository_metadata record depend. toolshed_base_url = str( web.url_for( '/', qualified=True ) ).rstrip( '/' ) rb = RelationBuilder( self.app, repository, repository_metadata, toolshed_base_url ) + # Work-around to ensure repositories that contain packages needed only for compiling + # a dependent package are included in the capsule. + rb.set_filter_dependencies_needed_for_compiling( False ) repository_dependencies = rb.get_repository_dependencies_for_changeset_revision() repo = hg_util.get_repo_for_repository( self.app, repository=self.repository, diff -r b08a47eb8c3c15022b9e3f7d9990d40fd0fa70c0 -r e45ed2368920315ab1f9cfe28d81e07cefc5c955 lib/tool_shed/dependencies/repository/relation_builder.py --- a/lib/tool_shed/dependencies/repository/relation_builder.py +++ b/lib/tool_shed/dependencies/repository/relation_builder.py @@ -23,6 +23,11 @@ self.handled_key_rd_dicts = [] self.key_rd_dicts_to_be_processed = [] self.tool_shed_url = tool_shed_url + # This is a temporary work-around for handling repository dependencies that are needed + # only if compiling a dependent package. This value should be True unless exporting + # a repository capsule, in which case the set_filter_dependencies_needed_for_compiling() + # function is called. + self.filter_dependencies_needed_for_compiling = True def can_add_to_key_rd_dicts( self, key_rd_dict, key_rd_dicts ): """Handle the case where an update to the changeset revision was done.""" @@ -389,9 +394,12 @@ current_repository_key_rd_dicts = \ self.get_updated_changeset_revisions_for_repository_dependencies( current_repository_key_rd_dicts ) for key_rd_dict in current_repository_key_rd_dicts: - # Filter out repository dependencies that are required only if compiling the dependent - # repository's tool dependency. - key_rd_dict = self.filter_only_if_compiling_contained_td( key_rd_dict ) + if self.filter_dependencies_needed_for_compiling: + # Filter out repository dependencies that are required only if compiling the dependent + # repository's tool dependency. + # TODO: this temporary work-around should be removed when the underlying framework + # support for handling only_if_compiling_contained_td-flagged repositories is completed. + key_rd_dict = self.filter_only_if_compiling_contained_td( key_rd_dict ) if key_rd_dict: is_circular = False in_handled_key_rd_dicts = self.in_key_rd_dicts( key_rd_dict, self.handled_key_rd_dicts ) @@ -483,6 +491,9 @@ clean_key_rd_dicts.append( new_key_rd_dict ) return clean_key_rd_dicts + def set_filter_dependencies_needed_for_compiling( self, value ): + self.filter_dependencies_needed_for_compiling = asbool( value ) + def update_circular_repository_dependencies( self, repository_key, repository_dependency, repository_dependencies ): repository_dependency_as_key = self.get_repository_dependency_as_key( repository_dependency ) repository_key_as_repository_dependency = repository_key.split( container_util.STRSEP ) 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