[game-data-packager] 03/24: make expansions depend on full game 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 0afd4b260dbf8ba5992d89782593b6b119a68e3e
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sat Jan 17 21:03:52 2015 +0100
make expansions depend on full game automatically
---
data/spear-of-destiny-mission2-data.control.in | 1 -
lib/game_data_packager/__init__.py | 11 +++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/data/spear-of-destiny-mission2-data.control.in b/data/spear-of-destiny-mission2-data.control.in
index f31c7ea..cb80364 100644
--- a/data/spear-of-destiny-mission2-data.control.in
+++ b/data/spear-of-destiny-mission2-data.control.in
@@ -3,7 +3,6 @@ Section: non-free/games
Priority: optional
Architecture: all
Multi-Arch: foreign
-Depends: spear-of-destiny-data
Recommends: wolf4sdl
Installed-Size: 56
Version: VERSION
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index aa508fc..3a27549 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1476,14 +1476,25 @@ class GameData(object):
control['Package'] = package.name
control['Installed-Size'] = size
+ depends = set()
suggests = set()
+ if 'Depends' in control:
+ for depend in control['Depends'].split(','):
+ depend = depend.strip()
+ depends.add(depend)
if 'Suggests' in control:
for suggest in control['Suggests'].split(','):
suggest = suggest.strip()
suggests.add(suggest)
+
+ if package.expansion_for:
+ depends.add(package.expansion_for)
for other_package in self.packages.values():
if other_package.expansion_for == package.name:
suggests.add(other_package.name)
+
+ if depends:
+ control['Depends'] = ', '.join(depends)
if suggests:
control['Suggests'] = ', '.join(suggests)
--
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