GNOME Bugzilla – Bug 742411
libxml2 should look for the xml catalog in XDG_DATA_DIRS
Last modified: 2021-07-05 13:26:58 UTC
We've started to standardise on XDG_DATA_DIRS/share/xml/catalog as a location for an xml catalog file installed by jhbuild. This is only used if the catalog cannot be found in the usual /etc/xml/catalog location. Several pieces of software already support this change, including gtk-doc and jhbuild itself. Currently libxml2 only checks /etc/xml/catalog (unless the XML_CATALOG_FILES environment variable is set). It would be nice if it could fall back to looking in XDG_DATA_DIRS/share/xml/catalog in case /etc/xml/catalog is not found.
Your usage of XDG_DATA_DIRS seems incorrect. You should not append /share to XDG_DATA_DIRS. As per the specification: If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used. With your usage, it would put the file in a location such as /usr/local/share/share/xml/catalog. I would also like to see this implemented, as Haiku makes use of the XDG base specification to provide our locations, such as /boot/system/data:/boot/system/non-packaged/data; as such, an implementation would reduce our need to patch libxml2 :)
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.