[game-data-packager] 09/20: Put default for compression into the Python code

Simon McVittie smcv at debian.org
Mon Jan 12 01:07:08 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 d2c2dd4c7e7682e8449491cdb7e10075f2f26c2a
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Jan 11 16:45:14 2015 +0000

    Put default for compression into the Python code
    
    In practice this isn't used yet, because the game-data-packager shell
    script still needs to do the same logic for non-YAML'd games.
---
 lib/game_data_packager/__init__.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 1df3c67..537769f 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1120,6 +1120,14 @@ class GameData(object):
 
         self.preserve_debs = (getattr(args, 'destination', None) is not None)
         self.install_debs = getattr(args, 'install', True)
+
+        if getattr(args, 'compress', None) is None:
+            # default to not compressing if we aren't going to install it
+            # anyway
+            args.compress = self.preserve_debs
+
+        # only compress if the command-line says we should and the YAML
+        # says it's worthwhile
         self.compress_deb = (self.compress_deb and
                 getattr(args, 'compress', 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