[game-data-packager] 01/03: add support for unrar-nonfree

Alexandre Detiste detiste-guest at moszumanska.debian.org
Sun Apr 12 12:30:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 8446a9c9543b4b3bbdaa820c1bddc70c3cb0b40a
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Sun Apr 12 14:17:51 2015 +0200

    add support for unrar-nonfree
    
    free version can't unpack self-extracting archives
---
 debian/control                 |  2 ++
 game_data_packager/__init__.py | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/debian/control b/debian/control
index 08e93f0..f83e70a 100644
--- a/debian/control
+++ b/debian/control
@@ -49,6 +49,8 @@ Suggests:
 	cabextract,
 # for Arx Fatalis
 	unace-nonfree,
+# for Arx Fatalis
+	unrar-nonfree,
 Architecture: all
 Multi-Arch: foreign
 Description: Installer for game data files
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 12fabf6..08fd468 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1503,6 +1503,16 @@ class GameData(object):
                     subprocess.check_call(['unace', 'x',
                              os.path.abspath(found_name)], cwd=tmpdir)
                     self.consider_file_or_dir(tmpdir)
+                elif fmt == 'unrar-nonfree':
+                    to_unpack = provider.unpack.get('unpack', provider.provides)
+                    logger.debug('Extracting %r from %s',
+                            to_unpack, found_name)
+                    tmpdir = os.path.join(self.get_workdir(), 'tmp',
+                            provider_name + '.d')
+                    mkdir_p(tmpdir)
+                    subprocess.check_call(['unrar-nonfree', 'x',
+                             os.path.abspath(found_name)], cwd=tmpdir)
+                    self.consider_file_or_dir(tmpdir)
                 elif fmt == 'innoextract':
                     to_unpack = provider.unpack.get('unpack', provider.provides)
                     logger.debug('Extracting %r from %s',
@@ -2547,6 +2557,7 @@ class GameData(object):
                 'id-shr-extract': 'dynamite',
                 'lha': 'lhasa',
                 '7z': 'p7zip-full',
+                'unrar-nonfree': 'unrar',
         }
         packages = set()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list