[game-data-packager] 01/01: 7z: implement '-r' flag, use when applicable
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Mon Apr 27 09:49: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 4b1c4f31415990294e679d82e183cf5b21259fda
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon Apr 27 11:47:02 2015 +0200
7z: implement '-r' flag, use when applicable
---
data/arx.yaml | 5 +----
data/ja.yaml | 10 ++--------
game_data_packager/__init__.py | 15 +++++----------
3 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/data/arx.yaml b/data/arx.yaml
index 4ad7027..ef3ff89 100644
--- a/data/arx.yaml
+++ b/data/arx.yaml
@@ -429,10 +429,7 @@ files:
# maybe there is a pattern here
unpack:
format: 7z
- unpack:
- - /Disk1/data1.cab
- - /Disk1/data1.hdr
- - /Disk1/data2.cab
+ flags: ['-r']
provides:
- data1.cab
- data1.hdr
diff --git a/data/ja.yaml b/data/ja.yaml
index d6bf533..5b9df99 100644
--- a/data/ja.yaml
+++ b/data/ja.yaml
@@ -103,10 +103,7 @@ files:
Jedi_Knight_jediacademydemo.exe:
unpack:
format: 7z
- unpack:
- - /Disk1/data1.cab
- - /Disk1/data1.hdr
- - /Disk1/data2.cab
+ flags: ['-r']
provides:
- data1.cab
- data1.hdr
@@ -123,10 +120,7 @@ files:
JediAcademyDemo.exe:
unpack:
format: 7z
- unpack:
- - /Disk1/data1.cab
- - /Disk1/data1.hdr
- - /Disk1/data2.cab
+ flags: ['-r']
provides:
- data1.cab
- data1.hdr
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 9407667..f92ab4a 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1576,16 +1576,11 @@ class GameData(object):
tmpdir = os.path.join(self.get_workdir(), 'tmp',
provider_name + '.d')
mkdir_p(tmpdir)
- # "Cannot use absolute pathnames for this command"
- if to_unpack[0][0] == '/':
- subprocess.check_call(['7z', 'x', '-bd',
- os.path.abspath(found_name)], cwd=tmpdir)
- else:
- subprocess.check_call(['7z', 'x', '-bd',
- os.path.abspath(found_name)] +
- list(to_unpack), cwd=tmpdir)
- for f in to_unpack:
- self.consider_file(os.path.join(tmpdir, f.lstrip('/')), True)
+ flags = provider.unpack.get('flags', [])
+ subprocess.check_call(['7z', 'x', '-bd'] + flags +
+ [os.path.abspath(found_name)] +
+ list(to_unpack), cwd=tmpdir)
+ self.consider_file_or_dir(tmpdir)
elif fmt == 'unshield':
other_parts = provider.unpack['other_parts']
for p in other_parts:
--
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