[game-data-packager] 06/09: Change how we represent the exceptions to the rule "must know the sizes"

Simon McVittie smcv at debian.org
Sun Oct 25 22:13: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 10e5e648ae2fab85097a66e359e07911bcdc5a55
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Oct 25 18:15:02 2015 +0000

    Change how we represent the exceptions to the rule "must know the sizes"
    
    The current approach scales poorly for Quake 4: I only have the Steam
    version, and while the md5sums for the international and German CD/DVD
    releases are available online, the exact sizes are not.
---
 data/grimfandango.yaml         | 3 +++
 data/quake.yaml                | 4 ++++
 game_data_packager/__init__.py | 8 +++-----
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/data/grimfandango.yaml b/data/grimfandango.yaml
index e76bb70..bf86107 100644
--- a/data/grimfandango.yaml
+++ b/data/grimfandango.yaml
@@ -488,6 +488,9 @@ files:
     install_to: $docdir
     look_for: ['grim fandango - manual.pdf', manual.pdf]
 
+unknown_sizes:
+  - vox0000.lab?unpatched
+
 size_and_md5: |
   # Small English Demo
   29489930  25d831d57a93eb3ab8edbb07b7b63943 gfdemo01.lab
diff --git a/data/quake.yaml b/data/quake.yaml
index 60a78cd..de292d8 100644
--- a/data/quake.yaml
+++ b/data/quake.yaml
@@ -302,6 +302,10 @@ files:
     - hipnotic/pak0.pak?orig
     - rogue/pak0.pak?mp12_cd
 
+unknown_sizes:
+  - hipnotic/pak0.pak?qdq_glquake_compat
+  - resource.1?106_cd
+
 cksums: |
   # Quake 1.01 CD (skitt@)
   # http://musicbrainz.org/release-group/ece43805-d8d4-4052-9cc7-806036633e32
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 736f869..d463541 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -928,11 +928,9 @@ class GameData(object):
                 assert wanted.size is None, wanted.name
             # FIXME: find out file size and add to yaml
             else:
-                assert wanted.size is not None or filename in (
-                   'hipnotic/pak0.pak?qdq_glquake_compat',
-                   'resource.1?106_cd',
-                   'vox0000.lab?unpatched',
-                   ), (self.shortname, wanted.name)
+                assert (wanted.size is not None or filename in
+                        self.data.get('unknown_sizes', ())
+                        ), (self.shortname, wanted.name)
 
     def construct_task(self, **kwargs):
         self.load_file_data()

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