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 949b3c041330a1eb29614bc0d4f2abc84343f18d Author: Alexandre Detiste <[email protected]> Date: Mon Jun 22 13:08:17 2015 +0200 zip files: 7z & unar can also handle old PKZIP1.0 archives --- data/wolf3d.yaml | 4 ++-- game_data_packager/__init__.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/data/wolf3d.yaml b/data/wolf3d.yaml index 75c048e..b616264 100644 --- a/data/wolf3d.yaml +++ b/data/wolf3d.yaml @@ -117,8 +117,8 @@ files: encoding: cp437 # 'zip' trigger this: NotImplementedError: compression type 6 (implode) unpack: - - maphead.wl6 - - gamemaps.wl6 + - MAPHEAD.WL6 + - GAMEMAPS.WL6 audiohed.wl6_1.0: install_as: audiohed.wl6 diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py index 12fcd0d..d5a53c2 100644 --- a/game_data_packager/__init__.py +++ b/game_data_packager/__init__.py @@ -1685,7 +1685,7 @@ class GameData(object): # for at least Theme Hospital the files we want are # actually in subdirectories, so we search recursively self.consider_file_or_dir(tmpdir) - elif fmt == 'unzip': + elif fmt == 'unzip' and which('unzip'): to_unpack = provider.unpack.get('unpack', provider.provides) logger.debug('Extracting %r from %s', to_unpack, found_name) @@ -1693,15 +1693,13 @@ class GameData(object): provider_name + '.d') mkdir_p(tmpdir) quiet = ['-q'] if VERBOSE else ['-qq'] - subprocess.check_call(['unzip', '-j', '-C', '-LL'] + + subprocess.check_call(['unzip', '-j', '-C'] + quiet + [os.path.abspath(found_name)] + list(to_unpack), cwd=tmpdir) # -j junk paths # -C use case-insensitive matching - # -LL forces conversion to lowercase - for f in to_unpack: - self.consider_file(os.path.join(tmpdir, f), True) - elif fmt == '7z': + self.consider_file_or_dir(tmpdir) + elif fmt in ('7z', 'unzip'): to_unpack = provider.unpack.get('unpack', provider.provides) logger.debug('Extracting %r from %s', to_unpack, found_name) @@ -1715,7 +1713,7 @@ class GameData(object): [os.path.abspath(found_name)] + list(to_unpack), cwd=tmpdir) self.consider_file_or_dir(tmpdir) - elif fmt == 'unar': + elif fmt in ('unar', 'unzip'): 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', @@ -2806,6 +2804,9 @@ class GameData(object): if which(fmt) is not None: return True + if fmt == 'unzip' and (which('7z') or which('unar')): + return True + # unace-nonfree package diverts /usr/bin/unace from unace package if (fmt == 'unace-nonfree' and PACKAGE_CACHE.is_installed('unace-nonfree')): -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

