request for new program, poss. 'dh_installsgmlcatalog'
Package: debhelper
Version: 3.0.8
Severity: wishlist
It would be nice and relatively easy to add a new program, which
might be called dh_installsgmlcatalog. Here is how it might work:
invokation: dh_installsgmlcatalog <ordinary-catalogs> ...
I'm sure you haven't been following recent changes in sgml-base, but
as of 1.0.7, we are deprecating the old install-sgmlcatalog in
favor of update-catalog, conforming to the usage proposed by the
LSB. Having a debhelper command I think would ease the migration.
The idea is that there is a "super catalog", /etc/sgml/catalog, which
just contains CATALOG references to "central catalogs", which
should always be named /etc/sgml/<package>.cat.
The wrinkle here is that <ordinary-catalogs> needs to be list of
absolute file names (for update-catalog). I would suggest that the
proposed dh_installsgmlcatalog allow a file reference relative
to /usr/share/sgml (and would prepend that automatically when
needed).
Anyhow, given the arguments above, the following commands
would need to be added to postinst (assuming that we can determine
the package name, and have that in the ${package} var):
if [ "$1" = configure ]; then
for ordcat in <ordinary-catalogs>; do
update-catalog --add /etc/sgml/${package}.cat ${ordcat}
done
update-catalog --add --super /etc/sgml/${package}.cat
fi
And in prerm:
if [ "$1" = remove ]; then
update-catalog --remove --super /etc/sgml/${package}.cat
fi
if [ "$1" = purge ]; then
rm -f /etc/sgml/${package}.cat /etc/sgml/${package}.cat.old
fi
These examples are tested and work.
Thanks.
-- System Information
Debian Release: testing/unstable
Architecture: sparc
Kernel: Linux arroz 2.2.18pre21 #1 Wed Nov 22 17:12:06 EST 2000 sparc64
Versions of packages debhelper depends on:
ii dpkg-dev 1.8.3.1 Package building tools for Debian
ii file 3.33-4 Determines file type using "magic"
ii fileutils 4.0.37-1 GNU file management utilities.
ii lynx 2.8.3-1 Text-mode WWW Browser
ii perl 5.6.0-20 Larry Wall's Practical Extracting
Reply to: