From 22ccb2f478a5f7dc6649cc46f8dfc85007d69ce9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 16 Jun 2011 14:55:54 +0200 Subject: [PATCH] perl-XML-SAX: also unregister the parser in pre_remove(). --- srcpkgs/perl-XML-SAX/template | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/srcpkgs/perl-XML-SAX/template b/srcpkgs/perl-XML-SAX/template index 16a73edd0d..a3d3b8ead1 100644 --- a/srcpkgs/perl-XML-SAX/template +++ b/srcpkgs/perl-XML-SAX/template @@ -23,5 +23,13 @@ post_stow() LC_ALL=C perl -MXML::SAX -e \ "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()" \ 2>&1 >/dev/null - [ $? -eq 0 ] && echo "Added parser to XML::SAX registry." + [ $? -eq 0 ] && msg_normal "Added parser to XML::SAX registry.\n" +} + +pre_remove() +{ + env LC_ALL=C perl -MXML::SAX -e \ + "XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()" \ + 2>&1 >/dev/null + [ $? -eq 0 ] && msg_normal "Removed parser from XML::SAX registry.\n" }