Bug#430118: libxml-sax-perl: patch for choosing the default parser better

Niko Tyni ntyni at iki.fi
Thu Nov 8 21:23:34 UTC 2007

tag 430118 patch


I'm attaching a proposed patch that fixes these RC issues mentioned in
this bug report. 

1) update-perl-sax-parsers makes the default parser be the last one
   returned by readdir(), resulting in the worst possible choice
   (XML::SAX::PurePerl) on ext3 filesystems with the dir_index option.

   The proposed fix is to assign a priority to each parser and set
   the XML::SAX::PurePerl priority low enough that all others will
   override it.

   The priorities are encoded into the ParserDetails.d entry filenames.
   The default priority is 50, XML::SAX::PurePerl gets 10, and parsers
   with the same priority are sorted in an alphabetic order.

   The priorities should be discussed between the maintainers
   of the parser modules (at least libxml-libxml-perl and
   libxml-sax-expat-perl). Currently XML::SAX::Expat ends up last and
   thus is the default parser when installed. This is probably the
   desired end result as well, so the transition should be smooth.

2) local changes to /etc/perl/XML/SAX/ParserDetails.ini aren't honored
   The patch handles the configuration file with ucf. The preinst script
   calculates and stores the md5sum for an unmodified config file to
   make sure that ucf dialogs don't pop up without reason.

3) local changes to the parser entries in /etc/perl/XML/SAX/ParserDetails.d/
   aren't honored

   The patch moves the ParserDetails.d directory under
   /var/lib/libxml-sax-perl. This means that the priorities introduced 
   in 1) can't be overridden by local configuration. I considered this
   but decided that it would be overengineering, as local configuration
   can go into the resulting ParserDetails.ini as well.

The issues should possibly cloned into three separate bugs, but the
patches can't really be made independent since they touch the same parts
of the code in several places.

The patch is formatted as an NMU, but the changes inside aren't quite as
minimal as would perhaps be proper for that. In particular, I decided
to remove the preinst pre-sarge cleanup of different iterations of the
/etc/perl/XML/SAX directory rather than patch the logic to handle yet
one move.

As the changes are rather extensive, I'd prefer something like this to
be included in a maintainer upload rather than an NMU. Jay, I haven't
seen anything from you on this since July. Would it be OK with you if
we adopted this for the pkg-perl group?

Any comments on the patch are naturally welcome.

Niko Tyni   ntyni at iki.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 430118.patch
Type: text/x-diff
Size: 21733 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20071108/1cd91e63/attachment.patch 

More information about the pkg-perl-maintainers mailing list