[game-data-packager] 09/11: lha, id-shr-extract: default to unpacking the provided files
Simon McVittie
smcv at debian.org
Mon Jan 12 23:37:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 618dd9cd1a7557547c79a879c11b4b07fc18dddc
Author: Simon McVittie <smcv at debian.org>
Date: Mon Jan 12 22:13:22 2015 +0000
lha, id-shr-extract: default to unpacking the provided files
---
data/spear-of-destiny.yaml | 10 ----------
data/wolf3d.yaml | 10 ----------
lib/game_data_packager/__init__.py | 16 +++++++---------
3 files changed, 7 insertions(+), 29 deletions(-)
diff --git a/data/spear-of-destiny.yaml b/data/spear-of-destiny.yaml
index 9a0df1e..c82e400 100644
--- a/data/spear-of-destiny.yaml
+++ b/data/spear-of-destiny.yaml
@@ -127,16 +127,6 @@ files:
sha256: 3d15590a5debf6e853bbcfb90358f6b7a3e5a71b3d0f3758ccc5d8ce7bf9eec3
unpack:
format: lha
- unpack:
- - audiohed.sdm
- - audiot.sdm
- - gamemaps.sdm
- - maphead.sdm
- - vgadict.sdm
- - vgagraph.sdm
- - vgahead.sdm
- - vswap.sdm
- - sod.doc
md5sums: |
f0022742f86c214872bd72f03aaf1529 audiohed.sdm
diff --git a/data/wolf3d.yaml b/data/wolf3d.yaml
index 7033847..2c1bff0 100644
--- a/data/wolf3d.yaml
+++ b/data/wolf3d.yaml
@@ -52,16 +52,6 @@ files:
sha256: 77ed56ae06ef28c01cf2f26e1199d63ee9dd5852087086d02198319c369aadb1
unpack:
format: id-shr-extract
- unpack:
- - audiohed.wl1
- - audiot.wl1
- - gamemaps.wl1
- - maphead.wl1
- - vendor.doc
- - vgadict.wl1
- - vgagraph.wl1
- - vgahead.wl1
- - vswap.wl1
md5sums: |
58aa1b9892d5adfa725fab343d9446f8 audiohed.wl1
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 6d22a38..03d57d5 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -452,9 +452,6 @@ class GameData(object):
for filename, wanted in self.files.items():
if wanted.unpack:
assert 'format' in wanted.unpack, filename
- if wanted.unpack['format'] == 'lha':
- # for this unpacker we have to know what to pull out
- assert wanted.unpack['unpack'], filename
if wanted.alternatives:
for alt in wanted.alternatives:
@@ -1068,27 +1065,28 @@ class GameData(object):
with zipfile.ZipFile(found_name, 'r') as zf:
self.consider_zip(found_name, zf, provider)
elif fmt == 'lha':
+ to_unpack = provider.unpack.get('unpack', provider.provides)
logger.debug('Extracting %r from %s',
- provider.unpack['unpack'], found_name)
+ to_unpack, found_name)
tmpdir = os.path.join(self.get_workdir(), 'tmp',
provider_name + '.d')
mkdir_p(tmpdir)
subprocess.check_call(['lha', 'xq',
os.path.abspath(found_name)] +
- provider.unpack['unpack'],
- cwd=tmpdir)
- for f in provider.unpack['unpack']:
+ to_unpack, cwd=tmpdir)
+ for f in to_unpack:
self.consider_file(os.path.join(tmpdir, f), True)
elif fmt == 'id-shr-extract':
+ to_unpack = provider.unpack.get('unpack', provider.provides)
logger.debug('Extracting %r from %s',
- provider.unpack['unpack'], found_name)
+ to_unpack, found_name)
tmpdir = os.path.join(self.get_workdir(), 'tmp',
provider_name + '.d')
mkdir_p(tmpdir)
subprocess.check_call(['id-shr-extract',
os.path.abspath(found_name)],
cwd=tmpdir)
- for f in provider.unpack['unpack']:
+ for f in to_unpack:
self.consider_file(os.path.join(tmpdir, f), True)
--
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