commit/galaxy-central: greg: Clarify problematic members of tar archives being uploaded to Tool Shed repositories.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/33b1ff4b9985/ Changeset: 33b1ff4b9985 User: greg Date: 2014-05-27 17:13:05 Summary: Clarify problematic members of tar archives being uploaded to Tool Shed repositories. Affected #: 1 file diff -r 3f5ed3658cbecfcdcfa6f130a0d3a361f98d5508 -r 33b1ff4b998541ae1ca1c302919077f4f29cc57a lib/tool_shed/util/commit_util.py --- a/lib/tool_shed/util/commit_util.py +++ b/lib/tool_shed/util/commit_util.py @@ -39,20 +39,25 @@ for member in archive.getmembers(): # Allow regular files and directories only if not ( member.isdir() or member.isfile() or member.islnk() ): - message = "Uploaded archives can only include regular directories and files (no symbolic links, devices, etc). Offender: %s" % str( member ) + message = "Uploaded archives can only include regular directories and files (no symbolic links, devices, etc). " + message += "The problematic member in this archive is %s," % str( member.name ) return False, message for item in [ '.hg', '..', '/' ]: if member.name.startswith( item ): - message = "Uploaded archives cannot contain .hg directories, absolute filenames starting with '/', or filenames with two dots '..'." + message = "Uploaded archives cannot contain .hg directories, absolute filenames starting with '/', or filenames with two dots '..'. " + message += "The problematic member in this archive is %s." % str( member.name ) return False, message if member.name in [ 'hgrc' ]: - message = "Uploaded archives cannot contain hgrc files." + message = "Uploaded archives cannot contain hgrc files. " + message += "The problematic member in this archive is %s." % str( member.name ) return False, message if repository.type == rt_util.REPOSITORY_SUITE_DEFINITION and member.name != rt_util.REPOSITORY_DEPENDENCY_DEFINITION_FILENAME: - message = 'Repositories of type <b>Repsoitory suite definition</b> can contain only a single file named <b>repository_dependencies.xml</b>.' + message = 'Repositories of type <b>Repository suite definition</b> can contain only a single file named <b>repository_dependencies.xml</b>.' + message += 'This archive contains a member named %s.' % str( member.name ) return False, message if repository.type == rt_util.TOOL_DEPENDENCY_DEFINITION and member.name != rt_util.TOOL_DEPENDENCY_DEFINITION_FILENAME: message = 'Repositories of type <b>Tool dependency definition</b> can contain only a single file named <b>tool_dependencies.xml</b>.' + message += 'This archive contains a member named %s.' % str( member.name ) return False, message return True, '' 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