[game-data-packager] 08/14: make copyright: value mandatory in YAML
Simon McVittie
smcv at debian.org
Sun Feb 15 15:25:37 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 4d78d8ae4f6e4b1eb0277b3f410a7a8f62c37bed
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Thu Feb 12 12:26:06 2015 +0100
make copyright: value mandatory in YAML
---
data/heretic.yaml | 2 +-
game_data_packager/__init__.py | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/data/heretic.yaml b/data/heretic.yaml
index d70f3d6..34960db 100644
--- a/data/heretic.yaml
+++ b/data/heretic.yaml
@@ -5,7 +5,7 @@
# http://doomwiki.org/wiki/HERETIC1.WAD
shortname: heretic
longname: "Heretic: Shadow of the Serpent Riders"
-copyright: @ 1994 Raven Software
+copyright: © 1994 Raven Software
plugin: doom_common
doom_engine: heretic
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 07b3ada..07305ca 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -326,6 +326,9 @@ class GameDataPackage(object):
# The optional marketing name of this version
self.longname = None
+ # This optional value will overide the game global copyright
+ self.copyright = None
+
# Where we install files.
# For instance, if this is 'usr/share/games/quake3' and we have
# a WantedFile with install_as='baseq3/pak1.pk3' then we would
@@ -442,6 +445,9 @@ class GameData(object):
# The formal name of the game, e.g. Quake III Arena
self.longname = shortname.title()
+ # The one-line copyright notice used to build debian/copyright
+ self.copyright = None
+
# A temporary directory.
self.workdir = workdir
@@ -476,6 +482,9 @@ class GameData(object):
if 'longname' in self.yaml:
self.longname = self.yaml['longname']
+ if 'copyright' in self.yaml:
+ self.copyright = self.yaml['copyright']
+
if 'aliases' in self.yaml:
self.aliases = set(self.yaml['aliases'])
@@ -726,10 +735,13 @@ 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', 'better_version'):
+ 'rip_cd', 'architecture', 'aliases', 'better_version',
+ 'copyright'):
if k in d:
setattr(package, k, d[k])
+ assert self.copyright or package.copyright, package.name
+
if 'install_to' in d:
assert 'usr/share/games/' + package.name != d['install_to'] + '-data', \
"install_to %s is extraneous" % package.name
--
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