Bug 52725 - build-docbook-catalog to support 4.2
The existing build-docbook-catalog scripts are version dependent, and more
importantly, are broken for docbook-xml-4.2 because they continue to reference
4.1.2. Here is a complete rewrite of build-docbook-catalog to solve that
problem and a few more.
I think this should be installed via a separate ebuild (build-docbook-catalog
for example) which can then be DEPENDed on by all the docbook-xml-dtd and
docbook-xsl-stylesheet ebuilds. All the versions of those ebuilds should be
rev-bumped to pick up the new dependancy and drop the old script version. The
script should be called from pkg_postinst and pkg_postun both since the script
does cleaning as well as installation.
Here is an example output when my script runs:
Found XML Catalog root /etc/xml/catalog
Cleaning existing /etc/xml/docbook delegates from /etc/xml/catalog
Found DocBook XML Catalog /etc/xml/docbook
Populating /etc/xml/catalog with DTD delegates to /etc/xml/docbook
Populating /etc/xml/catalog with ISO entities delegate to /etc/xml/docbook
Found DocBook XSL stylesheets in /usr/share/sgml/docbook/xsl-stylesheets-1.62.4
Populating /etc/xml/docbook with XSL stylesheets
Cleaning out old DocBook XML versions from /etc/xml/docbook and /etc/xml/catalog
Found DocBook XML 4.2 in /usr/share/sgml/docbook/xml-dtd-4.2
Populating /etc/xml/docbook based on /usr/share/sgml/docbook/xml-dtd-4.2
RCS datestamp in /usr/share/sgml/docbook/xml-dtd-4.2/docbookx.dtd is 2002/07/17 15:26:16
Found DocBook XML 4.1.2 in /usr/share/sgml/docbook/xml-dtd-4.1.2
Populating /etc/xml/docbook based on /usr/share/sgml/docbook/xml-dtd-4.1.2
RCS datestamp in /usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd is 2000/09/19 20:44:30
Using ISO DocBook entities from /usr/share/sgml/docbook/xml-dtd-4.2/ent
Populating /etc/xml/docbook with ISO DocBook entities
well, first part done. build-docbook-catalog-1.1.ebuild is in portage
Aron, do you have any opposition to me making the output of script a little
quieter?
Rather than an output such as:
Found XML Catalog root /etc/xml/catalog
Cleaning existing /etc/xml/docbook delegates from /etc/xml/catalog
Found DocBook XML Catalog /etc/xml/docbook
Populating /etc/xml/catalog with DTD delegates to /etc/xml/docbook
Populating /etc/xml/catalog with ISO entities delegate to /etc/xml/docbook
Found DocBook XSL stylesheets in /usr/share/sgml/docbook/xsl-stylesheets-1.65.1
Populating /etc/xml/docbook with XSL stylesheets
Cleaning out old DocBook XML versions from /etc/xml/docbook and
/etc/xml/catalogFound DocBook XML 4.2 in /usr/share/sgml/docbook/xml-dtd-4.2
Populating /etc/xml/docbook based on /usr/share/sgml/docbook/xml-dtd-4.2
RCS datestamp in /usr/share/sgml/docbook/xml-dtd-4.2/docbookx.dtd is
2002/07/17 15:26:16
Found DocBook XML 4.3 in /usr/share/sgml/docbook/xml-dtd-4.3
Populating /etc/xml/docbook based on /usr/share/sgml/docbook/xml-dtd-4.3
RCS datestamp in /usr/share/sgml/docbook/xml-dtd-4.3/docbookx.dtd is
2004/03/31 10:59:14
Found DocBook XML 4.1.2 in /usr/share/sgml/docbook/xml-dtd-4.1.2
Populating /etc/xml/docbook based on /usr/share/sgml/docbook/xml-dtd-4.1.2
RCS datestamp in /usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd is
2000/09/19 20:44:30
Using ISO DocBook entities from /usr/share/sgml/docbook/xml-dtd-4.3/ent
Populating /etc/xml/docbook with ISO DocBook entities
Have the output as:
Found DocBook XSL stylesheets in /usr/share/sgml/docbook/xsl-stylesheets-1.65.1
Found DocBook XML 4.2 in /usr/share/sgml/docbook/xml-dtd-4.2
Found DocBook XML 4.3 in /usr/share/sgml/docbook/xml-dtd-4.3
Found DocBook XML 4.1.2 in /usr/share/sgml/docbook/xml-dtd-4.1.2
Using ISO DocBook entities from /usr/share/sgml/docbook/xml-dtd-4.3/ent
What I propose is modifying the script so that the second output is normal
usage, and add a verbose flag (-v) to well.. be verbose. I can make the changes
in CVS if you give me the go ahead.
Thanks.
Mike, I just went ahead and added that functionality, hope you don't mind.
Okay, do you want to update the build-docbook-catalog ebuild (btw your README
is _very_ good, outlines everything to do!) or would you like me to do it?
Sorry, I forgot to do it last night, did it this morning. Cut'n'paste from the
README, of course ;-)
Fixed 4.1.2 and 4.2 to also use this script.
Thanks for all your work here Aron.