diff --git a/doc/changelog.txt b/doc/changelog.txt index 228ae19..4d749c1 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -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) diff --git a/patoolib/__init__.py b/patoolib/__init__.py index bf88706..dccd917 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -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',), diff --git a/patoolib/programs/clzip.py b/patoolib/programs/clzip.py index e9a8c8d..554746f 100644 --- a/patoolib/programs/clzip.py +++ b/patoolib/programs/clzip.py @@ -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 diff --git a/patoolib/programs/pdlzip.py b/patoolib/programs/pdlzip.py new file mode 100644 index 0000000..554746f --- /dev/null +++ b/patoolib/programs/pdlzip.py @@ -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 . +"""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 diff --git a/tests/test_archives.py b/tests/test_archives.py index eef501d..9384662 100644 --- a/tests/test_archives.py +++ b/tests/test_archives.py @@ -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' diff --git a/tests/test_foo_archives.py b/tests/test_foo_archives.py index 5041ab6..acd22b4 100644 --- a/tests/test_foo_archives.py +++ b/tests/test_foo_archives.py @@ -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):