After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788473 - fixxref crashes if a .devhelp2.gz file is found
fixxref crashes if a .devhelp2.gz file is found
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.26
Other Linux
: Normal normal
: 1.27
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-03 13:25 UTC by Simon McVittie
Modified: 2017-10-25 17:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixxref: Don't crash if a .devhelp2.gz file is present (1.51 KB, patch)
2017-10-03 13:25 UTC, Simon McVittie
committed Details | Review
rebase: Don't crash if a .devhelp2.gz file is present (847 bytes, patch)
2017-10-16 19:56 UTC, gkrithi8
committed Details | Review
rebase: Don't crash if a .devhelp2.gz file is present (916 bytes, patch)
2017-10-25 17:52 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
fixxref: Don't crash if a .devhelp2.gz file is present (1.58 KB, patch)
2017-10-25 17:52 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Simon McVittie 2017-10-03 13:25:55 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
Comment 1 gkrithi8 2017-10-16 19:56:08 UTC
Created attachment 361694 [details] [review]
rebase: Don't crash if a .devhelp2.gz file is present
Comment 2 gkrithi8 2017-10-16 19:58:23 UTC
Apply the above mentioned patches, if "gtkdoc-fixxref" or "gtkdoc-rebase" command fails with the following trace:

Traceback (most recent call last):
  • File "/usr/bin/gtkdoc-fixxref", line 57 in <module>
    fixxref.Run(options)
  • File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 85 in Run
    ScanIndices(dir, (re.search(prefix_match, dir) is None))
  • File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 153 in ScanIndices
    ScanIndices(subdir, use_absolute_links)
  • File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 148 in ScanIndices
    ''' % full_entry)
TypeError: %d format: a number is required, not str

(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
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2017-10-25 17:52:05 UTC
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
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2017-10-25 17:52:17 UTC
Created attachment 362279 [details] [review]
rebase: Don't crash if a .devhelp2.gz file is present
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2017-10-25 17:52:22 UTC
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>