Skip to content

docs: Fix generated XML syntax in tools/generate-docs-nm-settings-docs-gir.py

Class description may contains double quotes which is not valid as XML attribute value.

Example of failure: https://gnome.pages.gitlab.gnome.org/-/gnome-build-meta/-/jobs/891185/artifacts/logs/gnome/core-deps-NetworkManager/2d89df8c-build.10649.log

"python3" ./tools/generate-docs-nm-settings-docs-merge.py man/nm-settings-docs-dbus.xml libnm/nm-property-infos-dbus.xml libnm/nm-settings-docs-gir.xml
libtool: link: x86_64-unknown-linux-gnu-gcc -shared  -fPIC -DPIC  src/devices/adsl/.libs/libnm_device_plugin_adsl_la-nm-atm-manager.o src/devices/adsl/.libs/libnm_device_plugin_adsl_la-nm-device-adsl.o   -L/usr/lib/x86_64-linux-gnu -ludev -ldl  -Wl,--gc-sections -march=x86-64 -mtune=generic -O2 -g -fstack-protector-strong -grecord-gcc-switches -Wl,--version-script=./linker-script-devices.ver -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed   -Wl,-soname -Wl,libnm-device-plugin-adsl.so -o src/devices/adsl/.libs/libnm-device-plugin-adsl.so
libtool: link: x86_64-unknown-linux-gnu-gcc -fno-strict-aliasing -fdata-sections -ffunction-sections -Wl,--gc-sections -march=x86-64 -mtune=generic -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -o examples/C/glib/monitor-nm-state-gdbus examples/C/glib/monitor_nm_state_gdbus-monitor-nm-state-gdbus.o -Wl,--export-dynamic -pthread  -L/usr/lib/x86_64-linux-gnu -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -ldl -pthread
libtool: link: x86_64-unknown-linux-gnu-gcc -shared  -fPIC -DPIC  src/ppp/.libs/libnm_ppp_plugin_la-nm-ppp-manager.o   -L/usr/lib/x86_64-linux-gnu -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -ldl  -Wl,--gc-sections -march=x86-64 -mtune=generic -O2 -g -fstack-protector-strong -grecord-gcc-switches -Wl,--version-script=./src/ppp/nm-ppp-plugin.ver -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -Wl,--export-dynamic -pthread   -pthread -Wl,-soname -Wl,libnm-ppp-plugin.so -o src/ppp/.libs/libnm-ppp-plugin.so
G_DEBUG='' /usr/bin/vapigen-0.50  --library vapi/libnm --metadatadir ./vapi   --pkg gio-2.0 ./libnm/NM-1.0.gir && touch vapi/libnm.vapi
Traceback (most recent call last):
  File "./tools/generate-docs-nm-settings-docs-merge.py", line 127, in <module>
    xml_roots = list([ET.parse(f).getroot() for f in gl_input_files])
  File "./tools/generate-docs-nm-settings-docs-merge.py", line 127, in <listcomp>
    xml_roots = list([ET.parse(f).getroot() for f in gl_input_files])
  File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 595, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 6, column 266
libtool: link: ( cd "src/devices/adsl/.libs" && rm -f "libnm-device-plugin-adsl.la" && ln -s "../libnm-device-plugin-adsl.la" "libnm-device-plugin-adsl.la" )
make[2]: *** [Makefile:20202: man/nm-settings-docs-dbus.xml] Error 1
make[2]: *** Waiting for unfinished jobs....

Merge request reports