[game-data-packager] 01/10: implement 'better_version:' and use it for Wolf3D v1.2
Simon McVittie
smcv at debian.org
Fri Jan 23 01:05:35 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 d18ca03a6ba16574623e55bc2c0e85f64ed51321
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Thu Jan 22 15:01:15 2015 +0100
implement 'better_version:' and use it for Wolf3D v1.2
---
data/wolf3d.yaml | 1 +
game_data_packager/__init__.py | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/data/wolf3d.yaml b/data/wolf3d.yaml
index 2315929..af08a36 100644
--- a/data/wolf3d.yaml
+++ b/data/wolf3d.yaml
@@ -27,6 +27,7 @@ packages:
wolf3d-full-v12-data:
longname: Wolfenstein 3D v1.2
+ better_version: wolf3d-full-v14-data
debian:
engine: wolf4sdl
provides: wolf3d-data
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 3ca2e75..76418a5 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -320,6 +320,7 @@ class GameDataPackage(object):
# Names of relative packages
self.demo_for = set()
+ self.better_version = None
self.expansion_for = None
# The optional marketing name of this version
@@ -411,6 +412,7 @@ class GameDataPackage(object):
return {
'architecture': self.architecture,
'demo_for': sorted(self.demo_for),
+ 'better_version': self.better_version,
'expansion_for': self.expansion_for,
'install': sorted(self.install),
'install_to': self.install_to,
@@ -710,7 +712,7 @@ class GameData(object):
def _populate_package(self, package, d):
for k in ('expansion_for', 'longname', 'symlinks', 'install_to',
'install_to_docdir', 'install_contents_of', 'steam', 'debian',
- 'rip_cd', 'architecture', 'aliases'):
+ 'rip_cd', 'architecture', 'aliases', 'better_version'):
if k in d:
setattr(package, k, d[k])
@@ -2051,6 +2053,12 @@ class GameData(object):
'conflicts with "%s"', package.name, previous.name)
abort = True
+ if (package.better_version
+ and self.packages[package.better_version] in possible):
+ logger.debug('will not produce "%s" because better version '
+ '"%s" is also avaible', package.name, package.better_version)
+ abort = True
+
if abort:
continue
--
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