From 7a4bd2475c98f1337083023ace7104c5583b3128 Mon Sep 17 00:00:00 2001
From: Bastian Kleineidam <calvin@debian.org>
Date: Sat, 4 Aug 2012 14:09:08 +0200
Subject: [PATCH] Remove orange support.

---
 doc/changelog.txt           |  1 +
 patoolib/__init__.py        |  2 +-
 patoolib/programs/orange.py | 26 --------------------------
 tests/test_archives.py      |  5 -----
 tests/test_foo_archives.py  |  6 ------
 5 files changed, 2 insertions(+), 38 deletions(-)
 delete mode 100644 patoolib/programs/orange.py

diff --git a/doc/changelog.txt b/doc/changelog.txt
index 6d1954a..a6c14df 100644
--- a/doc/changelog.txt
+++ b/doc/changelog.txt
@@ -8,6 +8,7 @@
 * Added support for lcap handling CAB (.cab) archives.
 * Added support for shar handling SHAR (.shar) shell archives.
 * Added support for unadf handling ADF (.adf) amiga disk archives.
+* Removed support for orange handling self-extracting installers.
 * Generate standalone Windows .exe and Linux .rpm installer.
 * Initialize the internal MIME database correct on all platforms.
 * Improved option compatibility for the ar, cpio and tar programs.
diff --git a/patoolib/__init__.py b/patoolib/__init__.py
index 805ee40..d4a2b5c 100644
--- a/patoolib/__init__.py
+++ b/patoolib/__init__.py
@@ -118,7 +118,7 @@ ArchivePrograms = {
         'list': ('py_echo', '7z', '7za'),
     },
     'cab': {
-        'extract': ('cabextract', '7z', 'orange'),
+        'extract': ('cabextract', '7z'),
         'create': ('lcab',),
         'list': ('cabextract', '7z'),
         'test': ('cabextract', '7z'),
diff --git a/patoolib/programs/orange.py b/patoolib/programs/orange.py
deleted file mode 100644
index b85609f..0000000
--- a/patoolib/programs/orange.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-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 orange program."""
-
-def extract_cab (archive, compression, 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
diff --git a/tests/test_archives.py b/tests/test_archives.py
index 844d9d0..8da443c 100644
--- a/tests/test_archives.py
+++ b/tests/test_archives.py
@@ -334,11 +334,6 @@ class TestArchives (ArchiveTest):
         self.archive_list('t.cab')
         self.archive_extract('t.cab', check=None)
 
-    @needs_program('orange')
-    def test_orange (self):
-        self.program = 'orange'
-        self.archive_extract('t.cab')
-
     @needs_program('lcab')
     @needs_program('cabextract')
     def test_lcab (self):
diff --git a/tests/test_foo_archives.py b/tests/test_foo_archives.py
index d8d4d07..45248d2 100644
--- a/tests/test_foo_archives.py
+++ b/tests/test_foo_archives.py
@@ -350,12 +350,6 @@ class TestArchives (ArchiveTest):
         self.archive_list('t.cab.foo')
         self.archive_extract('t.cab.foo', check=None)
 
-    @needs_program('file')
-    @needs_program('orange')
-    def test_orange (self):
-        self.program = 'orange'
-        self.archive_extract('t.cab.foo')
-
     @needs_program('file')
     @needs_program('arj')
     def test_arj (self):