Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#3758 - docbook-xml xml catalog gets lost on upgrades

Attached to Project: Arch Linux
Opened by Jan de Groot (JGC) - Friday, 13 January 2006, 08:12 GMT
Last edited by Jan de Groot (JGC) - Saturday, 02 June 2007, 11:40 GMT
Task Type Bug Report
Category Packages: Current
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


The docbook-xml package includes /etc/xml/catalog, which is a file that gets edited by many packages (gtk-doc, scrollkeeper, gnome-doc-utils, libglade, etc). Upgrading docbook-xml would remove all these things from the catalog, which means scrollkeeper documentation installations will take ages, several applications fail to work, etc.

When updating this package, please generate the /etc/xml/catalog in postinstall if it doesn't exist, but make sure it's not included in the filelist anymore. I don't think there's a solution for this problem in this state: whenever you upgrade docbook-xml, the catalog is gone, whatever the new package will say. When upgrading docbook-xml, please also increase the pkgrel number for packages that install these things in /etc/xml/catalog (scrollkeeper and libglade are two examples I know of)
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 02 June 2007, 11:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  Finally, after all these years, after lots of irritation, after losing faith in this one ever getting fixed... I fixed it on linuxtag 2007 :)
Comment by Rafaël Carré (funman) - Monday, 18 September 2006, 01:26 GMT
what about copying debian management of catalogs ?
i know not much about catalogs, but i managed to package to arch (uglily) some debian packages including:
sgml-base sgml-data xml-core docbook

i also noticed that docbook-xml & docbook-xsl includes far less files than their debian equivalents

i dropped a mail to the docbook-xml package maintainer but got no answer :/
Comment by Attila (attila) - Wednesday, 06 December 2006, 13:22 GMT
Before doing this perhaps it would be better to take the rules file from the debian source package and put the necessary lines in the PKGBUILD if this is possible. Have you perhaps the possibility to get all this rules files from docbook*? I can't find a way to download the source packages from debian without using it.-)
Comment by Andrew Fyfe (space-m0nkey) - Monday, 09 April 2007, 20:26 GMT
Updated build/install scripts to fix this have been posted to
Comment by Jan de Groot (JGC) - Monday, 09 April 2007, 20:54 GMT
Those new build/install scripts will still remove the DTD registrations made by scrollkeeper and libglade. IMHO the XML catalog should not belong to a package, but should be only touched by post_upgrade and post_install scripts.
As pacman uses pre_upgrade from the new package when upgrading, preserving the XML catalog isn't a big problem anymore. I'll dive into this somewhere next week.
Comment by Andrew Fyfe (space-m0nkey) - Monday, 09 April 2007, 21:09 GMT
I might be missing something, but the new scripts I posted only touch /etc/xml/catalog using xmlcatlog. The /etc/xml/catalog isn't included in the package. I've just tested an upgrade of docbook-xml when libglade and scrollkeeper are installed. It doesn't do anything to the entries added by either of the packages.
Comment by Jan de Groot (JGC) - Thursday, 26 April 2007, 20:52 GMT
Docbook-xml contains the xml catalog as file inside the package, pacman will remove it on upgrade when it's not in the package anymore.
I looked a bit closer at your suggested changes, I think it will get included somewhere this week. The catalog preserving can be done from pre_upgrade, where a check is made for the older package, we could move the catalog out of the way in pre_upgrade, extract the new package and move the file back on post_upgrade.
Comment by Andrew Fyfe (space-m0nkey) - Tuesday, 22 May 2007, 20:42 GMT
An updated docbook-xml.install that makes a backup of etc/xml/catalog in pre_{upgrade,remove} and restores it in post_{upgrade,remove}.
Comment by Andrew Fyfe (space-m0nkey) - Tuesday, 22 May 2007, 20:52 GMT
I wasn't think straight :p there's no need to do anything in {pre,post}_remove.