[game-data-packager] 02/24: fill in Suggests: automatically
Simon McVittie
smcv at debian.org
Sat Jan 17 23:28:49 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 6d6aab7b4e4fe7c86ae7f0c3d138531563ec4276
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sat Jan 17 18:55:44 2015 +0100
fill in Suggests: automatically
---
data/rott-data.control.in | 1 -
data/spear-of-destiny-data.control.in | 1 -
lib/game_data_packager/__init__.py | 12 ++++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/data/rott-data.control.in b/data/rott-data.control.in
index 2b08f60..07a4860 100644
--- a/data/rott-data.control.in
+++ b/data/rott-data.control.in
@@ -4,7 +4,6 @@ Priority: optional
Architecture: all
Multi-Arch: foreign
Recommends: rott
-Suggests: rott-registered-data
Installed-Size: 56
Version: VERSION
Conflicts: rott (<< 1.1.1-4)
diff --git a/data/spear-of-destiny-data.control.in b/data/spear-of-destiny-data.control.in
index ebdc80c..3878e81 100644
--- a/data/spear-of-destiny-data.control.in
+++ b/data/spear-of-destiny-data.control.in
@@ -5,7 +5,6 @@ Priority: optional
Architecture: all
Multi-Arch: foreign
Recommends: wolf4sdl
-Suggests: spear-of-destiny-mission2-data, spear-of-destiny-mission3-data
Installed-Size: 56
Version: VERSION
Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index e5366a9..aa508fc 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1475,6 +1475,18 @@ class GameData(object):
assert control['Package'] in ('PACKAGE', package.name)
control['Package'] = package.name
control['Installed-Size'] = size
+
+ suggests = set()
+ if 'Suggests' in control:
+ for suggest in control['Suggests'].split(','):
+ suggest = suggest.strip()
+ suggests.add(suggest)
+ for other_package in self.packages.values():
+ if other_package.expansion_for == package.name:
+ suggests.add(other_package.name)
+ if suggests:
+ control['Suggests'] = ', '.join(suggests)
+
package.version = control['Version'].replace('VERSION',
GAME_PACKAGE_VERSION)
control['Version'] = package.version
--
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