[game-data-packager] 12/12: Installed-Size should be `du -sk . | cut -f1`, not `du -sk .`

Simon McVittie smcv at debian.org
Tue Jan 13 22:57:27 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 0395df027e51299a02db4b938d4a593dbf50299c
Author: Simon McVittie <smcv at debian.org>
Date:   Tue Jan 13 22:57:16 2015 +0000

    Installed-Size should be `du -sk . | cut -f1`, not `du -sk .`
    
    This is the Python equivalent of `cut -f1`, and gets rid of a spurious
    dot that was appearing at the end of the Installed-Size.
    Thanks to Alexandre for spotting this.
---
 lib/game_data_packager/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 39fdc2d..ca3c3cd 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1369,7 +1369,7 @@ class GameData(object):
 
     def modify_control_template(self, control, package, destdir):
         size = subprocess.check_output(['du', '-sk', '--exclude=./DEBIAN',
-            '.'], cwd=destdir).decode('utf-8').rstrip('\n')
+            '.'], cwd=destdir).decode('utf-8').split(None, 1)[0]
         assert control['Package'] in ('PACKAGE', package.name)
         control['Package'] = package.name
         control['Installed-Size'] = size

-- 
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