On Thu, 23 Jan 2025 23:46:51 +0000, David Miguel Susano Pinto wrote: > 2. A Debian packaging bug? > > After installing all these Debian packages, the default XML parser > ends up being XML::SAX::PurePerl. It shouldn't. The default > behaviour of XML::SAX is to use the latest installed. Since the > PurePerl parser comes with XML::SAX itself, it should be the first to > be installed and therefore only used when no other is available. > > I'm not sure how XML::SAX knows which parser was last installed but > this seems like a Debian package issue to me.
Thanks for looking into this! I got curious and had a brief look: There's update-perl-sax-parsers in libxml-sax-perl which handles the various parsers: https://salsa.debian.org/perl-team/modules/packages/libxml-sax-perl/-/blob/master/debian/update-perl-sax-parsers?ref_type=heads (update-perl-sax-parsers gets called by te postinst script in the various packages.) And on my laptop this seems to work -- as in it looks like described in the manpage: https://manpages.debian.org/unstable/libxml-sax-perl/update-perl-sax-parsers.8.en.html # ll /var/lib/libxml-sax-perl/ParserDetails.d total 16 -rw-r--r-- 1 root root 66 Nov 22 13:36 10-XML::SAX::PurePerl -rw-r--r-- 1 root root 64 Jan 24 13:01 50-XML::LibXML::SAX -rw-r--r-- 1 root root 72 Jan 24 13:01 50-XML::LibXML::SAX::Parser -rw-r--r-- 1 root root 181 Dec 11 2022 50-XML::SAX::Expat So XML::SAX::PurePerl has the lowest priority. # cat /etc/perl/XML/SAX/ParserDetails.ini [XML::SAX::PurePerl] http://xml.org/sax/features/namespaces = 1 [XML::LibXML::SAX] http://xml.org/sax/features/namespaces = 1 [XML::LibXML::SAX::Parser] http://xml.org/sax/features/namespaces = 1 [XML::SAX::Expat] http://xml.org/sax/features/external-general-entities = 1 http://xml.org/sax/features/external-parameter-entities = 1 http://xml.org/sax/features/namespaces = 1 And XML::SAX::PurePerl is mentioned first; and XML::SAX::Expat should be the one which gets used. So I'm not sure under which circumstances XML::SAX::PurePerl gets used as the default parser, but maybe this helps other to take a deeper look. Cheers, gregor -- .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe `-
signature.asc
Description: Digital Signature