Bug#1052371: game-data-packager: a crash while rebuilding quake2-full-data deb package

Sébastien Noel sebastien at twolife.be
Wed Feb 7 11:42:01 GMT 2024


On Thu, 21 Sep 2023 08:29:24 +0300 undef <csm.sub21 at gmail.com> wrote:
> Package: game-data-packager
> Version: 63
> Severity: normal
> 
> Dear Maintainer,
> when I tried to build quake2-full-data from the existing deb package
> gdb crashed
> 
>[..]

I was able to easily reproduce the crash.
A fix could be as simple as

--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -903,7 +903,7 @@ class PackagingTask:
         if provider is None:
             try_to_unpack: Collection[str] = self.game.files
             should_provide = set()
-            distinctive_dirs = False
+            distinctive_dirs = True
         else:
             try_to_unpack = set(f.name for f in
provider.provides_files)
             should_provide = set(try_to_unpack)


but i'm not familiar enough with that part of the code to have a full
view of the implications of that change...

Context:
- the file provided on the CLI is "unknown/untrusted" by g-d-p and so
there isn't any "provider" for the stream and for that case,
'distinctive_dirs' was set to False (what's the reasoning for that ?)

- quake2 have multiple (different) gamefiles that have the same
basename()

- the way we loop through the files in the unpacker and the gamefiles
lead to a tentative to seek backward when 'distinctive_dirs' is False
(we tries to extract dir1/file.md2 instead of dir2/file.md2)


I don't know why we should treat "unknown" stream with
'distinctive_dirs = False' by default, but maybe I'm missing something?


br,
Sébastien



More information about the Pkg-games-devel mailing list