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 d1f56c1c71dc59113580d1fff92c97eb2c187fc0 Author: Simon McVittie <s...@debian.org> Date: Thu Dec 28 22:54:03 2017 +0000 make_template: Pretend each template file was a package This lets us see what was and wasn't in a user-submitted template. Signed-off-by: Simon McVittie <s...@debian.org> --- game_data_packager/make_template.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/game_data_packager/make_template.py b/game_data_packager/make_template.py index 03678ba..8b67691 100644 --- a/game_data_packager/make_template.py +++ b/game_data_packager/make_template.py @@ -467,6 +467,16 @@ class Template: template_game.load_file_data() files = {} + package_name = 'template-%s' % os.path.basename(template) + i = 0 + + while package_name in self.game.packages: + i += 1 + package_name = 'template-%s-unique%d' % (os.path.basename(template, i)) + + package = self.game.construct_package(package_name, {}) + self.game.packages[package_name] = package + for name, f in template_game.files.items(): files[name] = self.add_hashed_file(f.filename, f, out_name=name, is_plain_file=False, unpack=False, @@ -505,6 +515,10 @@ class Template: self.reconcile_groups(ungrouped, stem='no particular group in ' + os.path.basename(template)) + self.reconcile_groups(list(files.values()), + stem='files listed in ' + os.path.basename(template), + package=package) + def add_one_dir(self, destdir, lower=False, game=None, lang=None, group_stem=None): basename = os.path.basename(os.path.abspath(destdir)) -- 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 Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits