[game-data-packager] 01/05: Add support for forcing a package's short description

Simon McVittie smcv at debian.org
Sun Jan 3 23:54:12 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 2e4d0699286a5b6235be80877ee0792a4c0e120b
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Jan 3 17:26:09 2016 +0000

    Add support for forcing a package's short description
    
    The default isn't great for game sub-packages with explanatory text,
    like "Unreal - binaries".
---
 game_data_packager/__init__.py | 10 ++++++++--
 game_data_packager/build.py    |  4 +++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 935c30b..da6248b 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 # encoding=utf-8
 #
-# Copyright © 2014-2015 Simon McVittie <smcv at debian.org>
+# Copyright © 2014-2016 Simon McVittie <smcv at debian.org>
 # Copyright © 2015 Alexandre Detiste <alexandre at detiste.be>
 #
 # This program is free software; you can redistribute it and/or
@@ -215,6 +215,10 @@ class GameDataPackage(object):
         # extra blurb of text added to .deb long description
         self.description = None
 
+        # first line of .deb description, or None to construct one from
+        # longname
+        self.short_description = None
+
         # This optional value will overide the game global copyright
         self.copyright = None
 
@@ -408,6 +412,7 @@ class GameDataPackage(object):
                 'expansion_for',
                 'expansion_for_ext',
                 'longname',
+                'short_description',
                 'url_misc',
                 'wiki',
                 ):
@@ -784,7 +789,8 @@ class GameData(object):
                 'install_to_docdir', 'install_contents_of', 'debian', 'description',
                 'rip_cd', 'architecture', 'aliases', 'better_version', 'langs', 'mutually_exclusive',
                 'copyright', 'engine', 'lang', 'component', 'section', 'disks', 'provides',
-                'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki', 'copyright_notice'):
+                'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki', 'copyright_notice',
+                'short_description'):
             if k in d:
                 setattr(package, k, d[k])
 
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 4c4b02e..eaf6e8b 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1728,7 +1728,9 @@ class PackagingTask(object):
     def generate_description(self, package):
         longname = package.longname or self.game.longname
 
-        if package.section == 'games':
+        if package.short_description is not None:
+            short_desc = package.short_description
+        elif package.section == 'games':
             short_desc = package.data_type + ' for "' + longname + '" game'
         else:
             short_desc = longname

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