Support plzip.

This commit is contained in:
Bastian Kleineidam 2012-05-11 07:14:49 +02:00
parent 1cb76a9633
commit 6917ab17bb
5 changed files with 43 additions and 4 deletions

View File

@ -7,6 +7,7 @@
* Fix generating an RPM installer. * Fix generating an RPM installer.
Closes: SF bug #2977749 Closes: SF bug #2977749
* Added support for the lbzip2 program handling BZIP2 archives. * Added support for the lbzip2 program handling BZIP2 archives.
* Added support for the plzip program handling LZIP archives.
0.15 "Contraband" (released 8.4.2012) 0.15 "Contraband" (released 8.4.2012)

View File

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

View File

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2012 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 plzip 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

@ -335,6 +335,13 @@ class TestArchives (ArchiveTest):
self.archive_extract('t.txt.lz') self.archive_extract('t.txt.lz')
self.archive_create('t.txt.lz', singlefile=True) self.archive_create('t.txt.lz', singlefile=True)
@needs_program('plzip')
def test_plzip (self):
self.program = 'plzip'
self.archive_test('t.txt.lz')
self.archive_extract('t.txt.lz')
self.archive_create('t.txt.lz', singlefile=True)
@needs_program('pdlzip') @needs_program('pdlzip')
def test_pdlzip (self): def test_pdlzip (self):
self.program = 'pdlzip' self.program = 'pdlzip'

View File

@ -371,6 +371,14 @@ class TestArchives (ArchiveTest):
self.archive_extract('t.txt.lz.foo') self.archive_extract('t.txt.lz.foo')
self.archive_create('t.txt.lz.foo', format="lzip", singlefile=True) self.archive_create('t.txt.lz.foo', format="lzip", singlefile=True)
@needs_program('file')
@needs_program('plzip')
def test_plzip (self):
self.program = 'plzip'
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('file')
@needs_program('pdlzip') @needs_program('pdlzip')
def test_pdlzip (self): def test_pdlzip (self):