1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
libxml-sax-perl for Debian
==========================
This is the Debian package of the Perl XML::SAX module which is the
base package for the Perl SAX parser modules. Besides the upstream
stuff it also contains a script (called update-perl-sax-parsers) to
manage the ParserDetails.ini file. Every Perl SAX parser module is
expected to register itself using the XML::SAX API resulting in an
update of ParserDetails.ini.
Unfortunately, the current XML::SAX API does not support removal of a
parser module. The current version update-perl-sax-parsers does
support this. What also is lacking is support for local parser
modules (e.g. in a user's home directory). Once a future version of
the API supports this update-perl-sax-parsers will be updated to
support that also.
Upstream puts the ParserDetails.ini file in /usr/share/perl5/XML/SAX.
In Debian this file can be found as /etc/XML/SAX/ParserDetails.ini to
which /usr/share/perl5/XML/SAX/ParserDetails.ini is symlinked.
This package creates the directory /etc/XML/SAX/ParserDetails.d which
contains per parser module a file with some info about the parser. To
add the info about parser module XML::FOO::BAR to this directory, use
update-perl-sax-parsers --add XML::FOO::BAR
and to remove it again use
update-perl-sax-parsers --remove XML::FOO::BAR
To update /etc/XML/SAX/ParserDetails.ini after an add or a remove, use
update-perl-sax-parsers --update
The update-perl-sax-parsers script is intended (for now at least) to
be used only in postinst and prerm scripts. Support for local parser
modules will be added later.
Below is an example of a postinst script:
---------------------------------------------------------------------------
#!/bin/sh
## ----------------------------------------------------------------------
## debian/postinst : postinstallation script for libxml-foo-bar-perl
## ----------------------------------------------------------------------
## ----------------------------------------------------------------------
set -e
## ----------------------------------------------------------------------
if [ "$1" = configure ]
then
update-perl-sax-parsers --add XML::FOO::BAR
update-perl-sax-parsers --update
fi
## ----------------------------------------------------------------------
## automatically generated debhelper commands
#DEBHELPER#
exit 0
---------------------------------------------------------------------------
and of a prerm script:
---------------------------------------------------------------------------
#!/bin/sh
## ----------------------------------------------------------------------
## debian/prerm : preremoval script for libxml-foo-bar-perl
## ----------------------------------------------------------------------
## ----------------------------------------------------------------------
set -e
## ----------------------------------------------------------------------
if [ "$1" = remove ]
then
update-perl-sax-parsers --remove XML::FOO::BAR
update-perl-sax-parsers --update
fi
## ----------------------------------------------------------------------
## automatically generated debhelper commands
#DEBHELPER#
exit 0
---------------------------------------------------------------------------
Ardo van Rangelrooij <ardo@debian.org>
|