Bug#775152: game-data-packager: Python/YAML code warns if you don't have the preferred alternative for a file

Simon McVittie smcv at debian.org
Mon Jan 12 00:47:26 UTC 2015


Package: game-data-packager
Version: 38
Severity: wishlist

I have the Steam version of Hexen, which only has hexdd.wad version 1.0.
hexen-deathkings-data is set up to allow either version 1.1 or 1.0.

When I repack it, it produces a spurious warning:

% game-data-packager hexen /usr/share/games
ERROR:game-data-packager:could not find hexdd.wad_1.1:
  expected:
    size:   4440584 bytes
    md5:    78d5898e99e220e4de64edaa0e479593
    sha1:   081f6a2024643b54ef4a436a85508539b6d20a1e
    sha256: None
generated "/home/smcv/src/debian/game-data-packager/hexen-wad_39_all.deb"
generated "/home/smcv/src/debian/game-data-packager/hexen-deathkings-data_39_all.deb"

Alexandre has reported the same thing but for the French version of RTCW.

I think this means I need to rethink how the code that searches for
interesting files works: if more than one file has the same filename in
look_for, when we find a matching file, we need to follow this logic
(<> indicates pseudocode):

    for wanted in <list of WantedFile where look_for contains filename>:
        if <file on disk matches size and hashes of wanted>:
            <use file on disk to provide wanted>
            break
    elif <not distinctive_name>:
        <warning>

To make that work, the GameData probably needs a data structure like
self.interesting_names = { 'doom.wad': set(['doom.wad_1.9', ...]) }.

This would also mean we could stop putting "distinctive_name: false"
on files that have alternative versions.

   S



More information about the Pkg-games-devel mailing list