Added support for pdlzip.

This commit is contained in:
Bastian Kleineidam 2011-01-17 13:27:54 -06:00
parent 85f592b8ea
commit 296283bf9e
6 changed files with 45 additions and 7 deletions

View File

@ -2,7 +2,7 @@
* Fix command argument order when extracting cpio archives.
* Added correct cpio MIME type on Debian systems.
* Added support for the clzip program which is like lzip capable
* Added support for the clzip and pdlzip programs who are both capable
of handling LZIP (.lz) archives.
0.12 "Galaxy Quest" (released 20.11.2010)

View File

@ -72,7 +72,7 @@ EncodingPrograms = {
'compress': ('compress',),
'lzma': ('lzma',),
'xz': ('xz',),
'lzip': ('lzip', 'clzip'),
'lzip': ('lzip', 'clzip', 'pdlzip'),
}
# List of programs supporting the given archive format and command.
@ -119,10 +119,10 @@ ArchivePrograms = {
None: ('lha',),
},
'lzip': {
'extract': ('lzip', 'clzip'),
'list': ('echo', 'clzip'),
'test': ('lzip', 'clzip'),
'create': ('lzip', 'clzip'),
'extract': ('lzip', 'clzip', 'pdlzip'),
'list': ('echo',),
'test': ('lzip', 'clzip', 'pdlzip'),
'create': ('lzip', 'clzip', 'pdlzip'),
},
'lrzip': {
'extract': ('lrzip',),

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2010 Bastian Kleineidam
# Copyright (C) 2011 Bastian Kleineidam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Bastian Kleineidam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Archive commands for the clzip program."""
from patoolib.programs import extract_singlefile_standard, \
test_singlefile_standard, create_singlefile_standard
extract_lzip = extract_singlefile_standard
test_lzip = test_singlefile_standard
create_lzip = create_singlefile_standard

View File

@ -321,6 +321,13 @@ class TestArchives (ArchiveTest):
self.archive_extract('t.txt.lz')
self.archive_create('t.txt.lz', singlefile=True)
@needs_program('pdlzip')
def test_clzip (self):
self.program = 'pdlzip'
self.archive_test('t.txt.lz')
self.archive_extract('t.txt.lz')
self.archive_create('t.txt.lz', singlefile=True)
@needs_program('unalz')
def test_unalz (self):
self.program = 'unalz'

View File

@ -361,6 +361,14 @@ class TestArchives (ArchiveTest):
self.archive_extract('t.txt.lz.foo')
self.archive_create('t.txt.lz.foo', format="lzip", singlefile=True)
@needs_program('file')
@needs_program('pdlzip')
def test_clzip (self):
self.program = 'pdlzip'
self.archive_test('t.txt.lz.foo')
self.archive_extract('t.txt.lz.foo')
self.archive_create('t.txt.lz.foo', format="lzip", singlefile=True)
@needs_program('file')
@needs_program('xz')
def test_xz (self):