Support plbzip2.
This commit is contained in:
parent
f41259ad1a
commit
1cb76a9633
|
@ -6,6 +6,7 @@
|
||||||
Closes: SF bug #3351936
|
Closes: SF bug #3351936
|
||||||
* 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.
|
||||||
|
|
||||||
|
|
||||||
0.15 "Contraband" (released 8.4.2012)
|
0.15 "Contraband" (released 8.4.2012)
|
||||||
|
|
|
@ -69,7 +69,7 @@ ArchiveMimetypes = {
|
||||||
|
|
||||||
EncodingPrograms = {
|
EncodingPrograms = {
|
||||||
'gzip': ('pigz', 'gzip'),
|
'gzip': ('pigz', 'gzip'),
|
||||||
'bzip2': ('pbzip2', 'bzip2'),
|
'bzip2': ('pbzip2', 'lbzip2', 'bzip2'),
|
||||||
'compress': ('compress',),
|
'compress': ('compress',),
|
||||||
'lzma': ('lzma',),
|
'lzma': ('lzma',),
|
||||||
'xz': ('xz',),
|
'xz': ('xz',),
|
||||||
|
@ -99,9 +99,9 @@ ArchivePrograms = {
|
||||||
'list': ('nomarch',),
|
'list': ('nomarch',),
|
||||||
},
|
},
|
||||||
'bzip2': {
|
'bzip2': {
|
||||||
'extract': ('pbzip2', 'bzip2', '7z', '7za'),
|
'extract': ('pbzip2', 'lbzip2', 'bzip2', '7z', '7za'),
|
||||||
'test': ('pbzip2', 'bzip2', '7z', '7za'),
|
'test': ('pbzip2', 'lbzip2', 'bzip2', '7z', '7za'),
|
||||||
'create': ('pbzip2', 'bzip2', '7z', '7za'),
|
'create': ('pbzip2', 'lbzip2', 'bzip2', '7z', '7za'),
|
||||||
'list': ('7z', '7za', 'echo',),
|
'list': ('7z', '7za', 'echo',),
|
||||||
},
|
},
|
||||||
'tar': {
|
'tar': {
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# -*- 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 pbzip2 program."""
|
||||||
|
# bzip2 and lbzip2 are compatible
|
||||||
|
from patoolib.programs.bzip2 import extract_bzip2, test_bzip2, create_bzip2
|
|
@ -110,6 +110,13 @@ class TestArchives (ArchiveTest):
|
||||||
self.archive_test('t .bz2')
|
self.archive_test('t .bz2')
|
||||||
self.archive_create('t .bz2', singlefile=True)
|
self.archive_create('t .bz2', singlefile=True)
|
||||||
|
|
||||||
|
@needs_program('lbzip2')
|
||||||
|
def test_lbzip2 (self):
|
||||||
|
self.program = 'lbzip2'
|
||||||
|
self.archive_extract('t .bz2')
|
||||||
|
self.archive_test('t .bz2')
|
||||||
|
self.archive_create('t .bz2', singlefile=True)
|
||||||
|
|
||||||
@needs_program('echo')
|
@needs_program('echo')
|
||||||
def test_echo (self):
|
def test_echo (self):
|
||||||
self.program = 'echo'
|
self.program = 'echo'
|
||||||
|
|
|
@ -128,6 +128,14 @@ class TestArchives (ArchiveTest):
|
||||||
self.archive_test('t.bz2.foo')
|
self.archive_test('t.bz2.foo')
|
||||||
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True)
|
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True)
|
||||||
|
|
||||||
|
@needs_program('file')
|
||||||
|
@needs_program('lbzip2')
|
||||||
|
def test_lbzip2 (self):
|
||||||
|
self.program = 'lbzip2'
|
||||||
|
self.archive_extract('t.bz2.foo')
|
||||||
|
self.archive_test('t.bz2.foo')
|
||||||
|
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True)
|
||||||
|
|
||||||
@needs_program('file')
|
@needs_program('file')
|
||||||
@needs_program('echo')
|
@needs_program('echo')
|
||||||
def test_echo (self):
|
def test_echo (self):
|
||||||
|
|
Loading…
Reference in New Issue