Added support for lzma or xz encoded tar files (ie. t.tar.lzma and t.tar.xz)

This commit is contained in:
Bastian Kleineidam 2010-02-22 18:22:49 +01:00
parent 8742abafe9
commit 3c01a64a16
2 changed files with 5 additions and 2 deletions

View File

@ -48,5 +48,8 @@ def add_star_opts (cmdlist, encoding, verbose):
cmdlist.append('-Z')
elif encoding == 'bzip2':
cmdlist.append('-bz')
elif encoding in ('lzma', 'xz'):
# use compress-program option
cmdlist.append('compress-program=%s' % encoding)
if verbose:
cmdlist.append('-v')

View File

@ -31,8 +31,8 @@ class TestArchives (ArchiveTest):
self.archive_commands('t.tar.Z', cmd)
self.archive_commands('t.tar.bz2', cmd)
self.archive_commands('t.tbz2', cmd)
# XXXself.archive_commands('t.tar.lzma', cmd)
# XXXself.archive_command('t.tar.xz', cmd)
self.archive_commands('t.tar.lzma', cmd)
self.archive_commands('t.tar.xz', cmd)
@needs_cmd('bzip2')
def test_bzip2 (self):