Source: gtk-doc
Version: 1.32-2
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: toolchain randomness
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
gtk-doc generates unreproducible output.

There will likely be more issues but this one is, at least, fairly
simple in that it iterates over a set structure when printing
some .devhelp2 headers, for example:

│ │ │ │ -    <sub name="Index of new API in 0.99.5" 
link="api-index-0-99-5.html"/>
│ │ │ │ -    <sub name="Index of new API in 0.9.22" 
link="api-index-0-9-22.html"/>
│ │ │ │      <sub name="Index of new API in 0.9.0" link="api-index-0-9-0.html"/>
│ │ │ │ -    <sub name="Index of new API in 0.9.1" link="api-index-0-9-1.html"/>
│ │ │ │ +    <sub name="Index of new API in 0.9.19" 
link="api-index-0-9-19.html"/>
│ │ │ │      <sub name="Index of new API in 0.99.8" 
link="api-index-0-99-8.html"/>
│ │ │ │ +    <sub name="Index of new API in 0.99.5" 
link="api-index-0-99-5.html"/>
│ │ │ │      <sub name="Index of new API in 1.0" link="api-index-1-0.html"/>
│ │ │ │ -    <sub name="Index of new API in 0.9.19" 
link="api-index-0-9-19.html"/>
│ │ │ │      <sub name="Index of new API in 0.9.2" link="api-index-0-9-2.html"/>
│ │ │ │ +    <sub name="Index of new API in 0.9.1" link="api-index-0-9-1.html"/>
│ │ │ │ +    <sub name="Index of new API in 0.9.22" 
link="api-index-0-9-22.html"/>

Sample patch attached.

  [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/gtkdoc/mkdb.py b/gtkdoc/mkdb.py
index bcb5423..087ede2 100644
--- a/gtkdoc/mkdb.py
+++ b/gtkdoc/mkdb.py
@@ -2491,7 +2491,7 @@ def OutputBook(main_file, book_top, book_bottom, 
obj_tree):
     <xi:include href="xml/api-index-deprecated.xml"><xi:fallback 
/></xi:include>
   </index>
 ''')
-        for version in set(Since.values()):
+        for version in sorted(set(Since.values())):
             dash_version = version.replace('.', '-')
             OUTPUT.write('''  <index id="api-index-%s" role="%s">
     <title>Index of new API in %s</title>

Reply via email to