Bug 1090204 - gtkdoc-depscan broken for gtk3, gdk3
Summary: gtkdoc-depscan broken for gtk3, gdk3
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk-doc
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-22 22:45 UTC by David Nečas
Modified: 2015-02-14 09:35 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-12 00:59:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Nečas 2014-04-22 22:45:59 UTC
Description of problem:
The latest update of gtk3 breaks gtkdoc-depscan for gtk3 and gdk3 devhelp books.  This seems to be caused by property descriptions

<keyword type="property" name="The &quot;default-display&quot; property" link="GdkDisplayManager.html#GdkDisplayManager--default-display"/>

changed to

<keyword type="property" name="The “default-display” property" link="GdkDisplayManager.html#GdkDisplayManager--default-display"/>

in .devhelp2 files.  Note the different representation of quotes (entities vs Unicode).


Version-Release number of selected component (if applicable):
gtk3-devel-docs-0:3.10.8-1.fc20


How reproducible:
Always.


Steps to Reproduce:
1. Create a C program bug.c with the following content:

void bug(void);

2. Run

gtkdoc-depscan -b gtk3 bug.c


Actual results:
It crashes with
Traceback (most recent call last):
  File "/usr/bin/gtkdoc-depscan", line 351, in <module>
    symbols.update(book.symbols)
  File "/usr/bin/gtkdoc-depscan", line 87, in _get_symbols
    self.parse(); return self.__symbols
  File "/usr/bin/gtkdoc-depscan", line 82, in parse
    parser.parse(open(self.__catalog))
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 304, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/usr/bin/gtkdoc-depscan", line 67, in startElement
    symbol = Symbol.from_xml(self.__book, attrs)
  File "/usr/bin/gtkdoc-depscan", line 201, in from_xml
    type, name = 'property', '%s::%s' % (owner, name.split('"')[1])
IndexError: list index out of range


Expected results:
It passes.


Additional info:
gtk3-devel-docs-0:3.10.7-1.fc20 is OK.

This is most likely a gtk-doc problem, however, the change was in the gtk3 package.  The installed version of gtk-doc on my systems has not changed and it is still gtk-doc-1.19-4.fc20 which is the latest version.

The gtk3 package .devhelp2 file states to be generated using "GTK-Doc V1.20.1 (XML mode)", i.e. a newer gtk-doc than available in updates-testing.

As more packages are rebuilt, more problems of this kind are to be expected.  Maybe a new gtk-doc package will fix it, however, the new .devhelp2 files are incompatible with the current gtk-doc.

Comment 1 Matthias Clasen 2015-02-12 00:51:48 UTC
clearly, a gtk-doc problem.

Comment 2 Matthias Clasen 2015-02-12 00:59:03 UTC
filed upstream: https://bugzilla.gnome.org/show_bug.cgi?id=744368

Comment 3 David Nečas 2015-02-14 09:35:41 UTC
Just a note, it was gtk3 and gdk3 problem in F20.  In F21, gtkdoc-depscan is broken for pretty much everything now (presumably because all packages were rebuilt).


Note You need to log in before you can comment on or make changes to this bug.