Added support for the orange CAB extracting program.
This commit is contained in:
parent
55f3716eb6
commit
80916bc335
|
@ -4,6 +4,8 @@
|
||||||
* Added correct cpio MIME type on Debian systems.
|
* Added correct cpio MIME type on Debian systems.
|
||||||
* Added support for the clzip and pdlzip programs who are both capable
|
* Added support for the clzip and pdlzip programs who are both capable
|
||||||
of handling LZIP (.lz) archives.
|
of handling LZIP (.lz) archives.
|
||||||
|
* Added support for the orange program which is capable of extracting
|
||||||
|
CAB (.cab) archives.
|
||||||
* Support ZIP (.zip) file creation with the 7z and 7za programs.
|
* Support ZIP (.zip) file creation with the 7z and 7za programs.
|
||||||
* Improved MIME type detection for compressed TAR archives.
|
* Improved MIME type detection for compressed TAR archives.
|
||||||
* Fix needed archive programs for several test cases, including
|
* Fix needed archive programs for several test cases, including
|
||||||
|
|
|
@ -146,7 +146,7 @@ ArchivePrograms = {
|
||||||
'test': ('unrar', '7z'),
|
'test': ('unrar', '7z'),
|
||||||
},
|
},
|
||||||
'cab': {
|
'cab': {
|
||||||
'extract': ('cabextract', '7z'),
|
'extract': ('cabextract', '7z', 'orange'),
|
||||||
'list': ('cabextract', '7z'),
|
'list': ('cabextract', '7z'),
|
||||||
'test': ('cabextract', '7z'),
|
'test': ('cabextract', '7z'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (C) 2010 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 orange program."""
|
||||||
|
|
||||||
|
def extract_cab (archive, encoding, cmd, **kwargs):
|
||||||
|
"""Extract a CAB archive."""
|
||||||
|
cmdlist = [cmd, '-d', kwargs['outdir']]
|
||||||
|
if kwargs['verbose']:
|
||||||
|
cmdlist.append('-D 2')
|
||||||
|
else:
|
||||||
|
cmdlist.append('-D 1')
|
||||||
|
cmdlist.append(archive)
|
||||||
|
return cmdlist
|
|
@ -244,6 +244,11 @@ class TestArchives (ArchiveTest):
|
||||||
self.archive_list('t.cab')
|
self.archive_list('t.cab')
|
||||||
self.archive_extract('t.cab')
|
self.archive_extract('t.cab')
|
||||||
|
|
||||||
|
@needs_program('orange')
|
||||||
|
def test_cabextract (self):
|
||||||
|
self.program = 'orange'
|
||||||
|
self.archive_extract('t.cab')
|
||||||
|
|
||||||
@needs_program('arj')
|
@needs_program('arj')
|
||||||
def test_arj (self):
|
def test_arj (self):
|
||||||
self.program = 'arj'
|
self.program = 'arj'
|
||||||
|
|
|
@ -272,6 +272,12 @@ class TestArchives (ArchiveTest):
|
||||||
self.archive_list('t.cab.foo')
|
self.archive_list('t.cab.foo')
|
||||||
self.archive_extract('t.cab.foo')
|
self.archive_extract('t.cab.foo')
|
||||||
|
|
||||||
|
@needs_program('file')
|
||||||
|
@needs_program('orange')
|
||||||
|
def test_cabextract (self):
|
||||||
|
self.program = 'orange'
|
||||||
|
self.archive_extract('t.cab.foo')
|
||||||
|
|
||||||
@needs_program('file')
|
@needs_program('file')
|
||||||
@needs_program('arj')
|
@needs_program('arj')
|
||||||
def test_arj (self):
|
def test_arj (self):
|
||||||
|
|
Loading…
Reference in New Issue