GNOME Bugzilla – Bug 788473
fixxref crashes if a .devhelp2.gz file is found
Last modified: 2017-10-25 17:52:22 UTC
Created attachment 360835 [details] [review] fixxref: Don't crash if a .devhelp2.gz file is present devhelp itself supports gzip-compressed indices (since 2003), but gtk-doc does not. The Debian packaging toolchain was changed in 2015 to avoid compressing those files (Debian #789153[1], Launchpad #1466210[2]), but a few undermaintained packages (gespeaker, libsocialweb, ogmrip, telepathy-glib) have not been rebuilt since then and so still install devhelp2.gz indices. The %d printf-style format specifier in Python expects an integer, so emitting a warning about those packages would cause gtk-doc to crash. Use %s instead. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789153 [2] https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/1466210
Created attachment 361694 [details] [review] rebase: Don't crash if a .devhelp2.gz file is present
Apply the above mentioned patches, if "gtkdoc-fixxref" or "gtkdoc-rebase" command fails with the following trace: Traceback (most recent call last):
+ Trace 238068
fixxref.Run(options)
ScanIndices(dir, (re.search(prefix_match, dir) is None))
ScanIndices(subdir, use_absolute_links)
''' % full_entry)
(or) Traceback (most recent call last): File "/usr/bin/gtkdoc-rebase", line 56, in <module> sys.exit(rebase.run(options)) File "/usr/share/gtk-doc/python/gtkdoc/rebase.py", line 73, in run ScanDirectory(dir, options) File "/usr/share/gtk-doc/python/gtkdoc/rebase.py", line 131, in ScanDirectory ScanDirectory(subdir, options) File "/usr/share/gtk-doc/python/gtkdoc/rebase.py", line 123, in ScanDirectory ''' % (scan_dir, entry)) TypeError: %d format: a number is required, not str
The following fixes have been pushed: 6c7c1e5 rebase: Don't crash if a .devhelp2.gz file is present d6a75bd fixxref: Don't crash if a .devhelp2.gz file is present
Created attachment 362279 [details] [review] rebase: Don't crash if a .devhelp2.gz file is present
Created attachment 362280 [details] [review] fixxref: Don't crash if a .devhelp2.gz file is present devhelp itself supports gzip-compressed indices (since 2003), but gtk-doc does not. The Debian packaging toolchain was changed in 2015 to avoid compressing those files (Debian #789153[1], Launchpad #1466210[2]), but a few undermaintained packages (gespeaker, libsocialweb, ogmrip, telepathy-glib) have not been rebuilt since then and so still install devhelp2.gz indices. The %d printf-style format specifier in Python expects an integer, so emitting a warning about those packages would cause gtk-doc to crash. Use %s instead. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789153 [2] https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/1466210 Signed-off-by: Simon McVittie <smcv@debian.org>