make Doxygen documentation reproducible
authorDebian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Thu, 10 Nov 2022 12:55:28 +0000 (13:55 +0100)
committerIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Thu, 10 Nov 2022 12:55:28 +0000 (13:55 +0100)
Origin: Debian
Bug: https://github.com/juce-framework/JUCE/issues/1148
Last-Update: 2022-11-10

Python's os.listdir() returns the entries in an undefined order,
which in turn makes the generated documentation unreproducible.
this patch just sorts the entries returned by os.listdir()
Last-Update: 2022-11-10
Gbp-Pq: Name reproducible_docs.patch

docs/doxygen/process_source_files.py

index c38135dabef7122a7a31a7261b2ea1be94cea0b2..85ec8ee2f9e2afabf8d09110782c4561ee6cb91b 100644 (file)
@@ -87,7 +87,7 @@ if __name__ == "__main__":
         juce_modules = args.subdirs.split(",")
     else:
         juce_modules = []
-        for item in os.listdir(args.source_dir):
+        for item in sorted(os.listdir(args.source_dir)):
             if os.path.isdir(os.path.join(args.source_dir, item)):
                 juce_modules.append(item)
 
@@ -136,7 +136,7 @@ if __name__ == "__main__":
 
         # Create a list of the directories in the module that we can use as
         # subgroups and create the Doxygen group hierarchy string.
-        dir_contents = os.listdir(module_path)
+        dir_contents = sorted(os.listdir(module_path))
         # Ignore "native" folders as these are excluded by doxygen.
         try:
             dir_contents.remove("native")