#944871 docbook-xsl: readds catalogs to the super catalog on every upgrade

#944871#5
Date:
2019-11-16 17:34:57 UTC
From:
To:
Consider the following interaction:

| # apt install docbook-xsl
| # grep delegateURI.*xsl /etc/xml/catalog
| <delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///etc/xml/docbook-xsl.xml"/>
| # update-xmlcatalog --del --type uri --id "http://docbook.sourceforge.net/release/xsl/" --root
| # grep delegateURI.*xsl /etc/xml/catalog
| # apt reinstall docbook-xsl
| # grep delegateURI.*xsl /etc/xml/catalog
| <delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///etc/xml/docbook-xsl.xml"/>
| #

We can see that apt reinstall docbook-xsl changed the contents of
/etc/xml/catalog. This also happens during package upgrades. The prerm
script removes docbook-xsl from the root catalog and the postinst script
adds it back. Thus, removal by a user is not preserved. This is a
violation of Debian policy section 10.7.3, which says "local changes
must be preserved during a package upgrade".

We had a very similar issue with the sgml super catalog. Read up on
#88010 and #477751. Fixing that one was very painful. It required a lot
of uploads and we ran into bugs with dpkg triggers. I guess that this
bug is similarly painful. On the bright side, fixing this has the
potential to remove a lot of maintainer scripts and move us towards more
declarative packaging.

Unfortunately, it really is a violation of the policy and we should
either fix this bug or policy. I'm unsure how to proceed here, so I just
report it. Good luck.

Helmut

#944871#12
Date:
2023-03-05 18:50:54 UTC
From:
To:
Hi,

I’ve looked at this tentatively and the issue is rather in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910841

As mentioned in a reply, https://lists.debian.org/debian-qa/2015/08/msg00015.html gives an overall plan of what needs to be done.

Abdelhakim