[arch-commits] Commit in perl-xml-libxml/trunk (PKGBUILD perl-xml-libxml.install)

Eric Bélanger eric at archlinux.org
Fri Apr 3 23:38:22 UTC 2015


    Date: Saturday, April 4, 2015 @ 01:38:22
  Author: eric
Revision: 235403

upgpkg: perl-xml-libxml 2.0118-3

Fix install scriptlet (close FS#44408)

Modified:
  perl-xml-libxml/trunk/PKGBUILD
  perl-xml-libxml/trunk/perl-xml-libxml.install

-------------------------+
 PKGBUILD                |    4 ++--
 perl-xml-libxml.install |   17 +++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-04-03 19:45:26 UTC (rev 235402)
+++ PKGBUILD	2015-04-03 23:38:22 UTC (rev 235403)
@@ -5,7 +5,7 @@
 
 pkgname=perl-xml-libxml
 pkgver=2.0118
-pkgrel=2
+pkgrel=3
 pkgdesc="Interface to the libxml library"
 arch=('i686' 'x86_64')
 url="http://search.cpan.org/dist/XML-LibXML"
@@ -14,7 +14,7 @@
 provides=('perl-libxml' 'perl-xml-libxml-common')
 replaces=('perl-libxml' 'perl-xml-libxml-common')
 options=('!emptydirs')
-install=$pkgname.install
+install=perl-xml-libxml.install
 source=(http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-$pkgver.tar.gz)
 md5sums=('da8d61a5d0d1bfd8d46814e376d33f58')
 

Modified: perl-xml-libxml.install
===================================================================
--- perl-xml-libxml.install	2015-04-03 19:45:26 UTC (rev 235402)
+++ perl-xml-libxml.install	2015-04-03 23:38:22 UTC (rev 235403)
@@ -1,15 +1,16 @@
 post_install() {
   echo ":: Installing SAX XML Parsers"
-  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
-  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
+  perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
+  perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
 }
 
 post_upgrade() {
-  libxmlcount=`grep -c XML::LibXML::SAX /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini`
-  if [[ $libxmlcount == 0 ]]; then
-	  echo ":: Installing SAX XML Parsers"
-	  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
-	  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
+  if [[ ! -f /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini ]]; then
+    post_install
+  else
+    libxmlcount=`grep -c XML::LibXML::SAX /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini`
+    if [[ $libxmlcount == 0 ]]; then
+      post_install
+    fi
   fi
 }
-



More information about the arch-commits mailing list