[game-data-packager] 09/14: launcher: add support for symlinking expansion data into dot directory
Simon McVittie
smcv at debian.org
Fri Oct 14 00:09:50 UTC 2016
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 2ca2c41269f3b77ba8e7a9a74e939c6def8202d4
Author: Simon McVittie <smcv at debian.org>
Date: Wed Oct 12 11:13:43 2016 +0100
launcher: add support for symlinking expansion data into dot directory
This is a lot more convenient than how Quake 3 currently deals with
the Team Arena expansion and its patch being in different packages.
---
runtime/launcher.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/runtime/launcher.py b/runtime/launcher.py
index 81ad311..9c40cb4 100755
--- a/runtime/launcher.py
+++ b/runtime/launcher.py
@@ -253,6 +253,18 @@ class Launcher:
else:
self.warning_stamp = None
+ self.symlink_into_dot_directory = self.data.get(
+ 'symlink_into_dot_directory', [])
+ for expansion, data in self.data.get('expansions', {}).items():
+ base_directories = list(map(expand, data.get('base_directories',
+ []))) + self.base_directories
+
+ if self.check_required_files(base_directories,
+ data.get('extra_required_files', [])):
+ self.symlink_into_dot_directory = (
+ self.symlink_into_dot_directory +
+ data.get('symlink_into_dot_directory', []))
+
logger.debug('Arguments: %r', self.argv)
def check_required_files(self, base_directories, required_files,
@@ -438,7 +450,7 @@ class Launcher:
logger.info('Copying %s -> %s', f, target)
shutil.copyfile(f, target)
- for subdir in self.data.get('symlink_into_dot_directory', ()):
+ for subdir in self.symlink_into_dot_directory:
assert self.dot_directory is not None
dot_subdir = os.path.join(self.dot_directory, subdir)
logger.debug('symlinking ${each base directory}/%s/** as %s/**',
--
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