r49916 - in /trunk/libxml-sax-perl/debian: changelog control patches/parserdetails-debian rules update-perl-sax-parsers

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sat Jan 2 10:28:54 UTC 2010


Author: ansgar-guest
Date: Sat Jan  2 10:28:46 2010
New Revision: 49916

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=49916
Log:
* Move Debian-specific functions to a subclass as suggested by Evan Carroll.
  If XML::SAX is installed via CPAN, it will not see the ParserDetails.ini
  in /etc/perl/XML/SAX, ie. users will have to enable additional parsers by
  hand or install them via CPAN as well. (LP: #13917)
* Use minimal debian/rules.
* Add byself to Uploaders.
* Bump Standards-Version to 3.8.3 (no changes).

Modified:
    trunk/libxml-sax-perl/debian/changelog
    trunk/libxml-sax-perl/debian/control
    trunk/libxml-sax-perl/debian/patches/parserdetails-debian
    trunk/libxml-sax-perl/debian/rules
    trunk/libxml-sax-perl/debian/update-perl-sax-parsers

Modified: trunk/libxml-sax-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/debian/changelog?rev=49916&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/changelog (original)
+++ trunk/libxml-sax-perl/debian/changelog Sat Jan  2 10:28:46 2010
@@ -1,3 +1,15 @@
+libxml-sax-perl (0.96+dfsg-2) unstable; urgency=low
+
+  * Move Debian-specific functions to a subclass as suggested by Evan Carroll.
+    If XML::SAX is installed via CPAN, it will not see the ParserDetails.ini
+    in /etc/perl/XML/SAX, ie. users will have to enable additional parsers by
+    hand or install them via CPAN as well. (LP: #13917)
+  * Use minimal debian/rules.
+  * Add byself to Uploaders.
+  * Bump Standards-Version to 3.8.3 (no changes).
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Sat, 02 Jan 2010 19:28:28 +0900
+
 libxml-sax-perl (0.96+dfsg-1) unstable; urgency=low
 
   [ Antonio Radici ]

Modified: trunk/libxml-sax-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/debian/control?rev=49916&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/control (original)
+++ trunk/libxml-sax-perl/debian/control Sat Jan  2 10:28:46 2010
@@ -3,12 +3,12 @@
 Priority: optional
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Jay Bonci <jaybonci at debian.org>, Niko Tyni <ntyni at debian.org>,
- Antonio Radici <antonio at dyne.org>
-Standards-Version: 3.8.0
+ Antonio Radici <antonio at dyne.org>, Ansgar Burchardt <ansgar at 43-1.org>
+Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/XML-SAX/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libxml-sax-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libxml-sax-perl/
-Build-Depends: debhelper (>= 7), quilt
+Build-Depends: debhelper (>= 7.0.8~), quilt (>= 0.46-7)
 Build-Depends-Indep: perl, libxml-namespacesupport-perl
 
 Package: libxml-sax-perl

Modified: trunk/libxml-sax-perl/debian/patches/parserdetails-debian
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/debian/patches/parserdetails-debian?rev=49916&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/patches/parserdetails-debian (original)
+++ trunk/libxml-sax-perl/debian/patches/parserdetails-debian Sat Jan  2 10:28:46 2010
@@ -11,8 +11,8 @@
 Originally by Ardo van Rangelrooij <ardo at debian.org>
 Cleanups and quilt conversion by Niko Tyni <ntyni at iki.fi>
 
---- a/t/01known.t
-+++ b/t/01known.t
+--- libxml-sax-perl.orig/t/01known.t
++++ libxml-sax-perl/t/01known.t
 @@ -1,6 +1,9 @@
 -use Test;
 +use Test::More;
@@ -24,8 +24,8 @@
  ok(XML::SAX->load_parsers);
  ok(@{XML::SAX->parsers}, 0);
 +}
---- a/t/99cleanup.t
-+++ b/t/99cleanup.t
+--- libxml-sax-perl.orig/t/99cleanup.t
++++ libxml-sax-perl/t/99cleanup.t
 @@ -1,7 +1,7 @@
  use Test;
  BEGIN { plan tests => 1 }
@@ -35,9 +35,9 @@
      File::Spec->catdir(qw(blib lib XML SAX ParserDetails.ini))),
      1,
      'delete ParserDetails.ini'
---- a/Makefile.PL
-+++ b/Makefile.PL
-@@ -16,6 +16,10 @@ sub MY::install {
+--- libxml-sax-perl.orig/Makefile.PL
++++ libxml-sax-perl/Makefile.PL
+@@ -16,6 +16,10 @@
      package MY;
      my $script = shift->SUPER::install(@_);
  
@@ -48,9 +48,9 @@
      # Only modify existing ParserDetails.ini if user agrees
  
      my $write_ini_ok = 0;
---- a/SAX.pm
-+++ b/SAX.pm
-@@ -179,6 +179,15 @@ sub add_parser {
+--- libxml-sax-perl.orig/SAX.pm
++++ libxml-sax-perl/SAX.pm
+@@ -179,6 +179,15 @@
  sub save_parsers {
      my $class = shift;
      
@@ -66,16 +66,39 @@
      # get directory from wherever XML::SAX is installed
      my $dir = $INC{'XML/SAX.pm'};
      $dir = dirname($dir);
-@@ -206,6 +215,40 @@ sub save_parsers {
-     return $class;
+@@ -212,6 +221,10 @@
+     warn(@_) unless $ENV{HARNESS_ACTIVE};
  }
  
++sub _is_vendor_supplied {
++    1;
++}
++
+ 1;
+ __END__
+ 
+--- /dev/null
++++ libxml-sax-perl/SAX/Debian.pm
+@@ -0,0 +1,47 @@
++package XML::SAX::Debian;
++
++use strict;
++use warnings;
++
++use base "XML::SAX";
++
++use File::Spec ();
++
 +sub save_parsers_debian {
 +    my $class = shift;
 +    my ($parser_module,$directory, $priority) = @_;
 +
 +    # add parser
-+    $known_parsers = [];
++    {
++        # We do not want load_parsers to complain.
++        local $ENV{HARNESS_ACTIVE} = 1;
++        $class->load_parsers("/nonexistent");
++    }
 +    $class->add_parser($parser_module);
 +
 +    # get parser's ParserDetails file
@@ -85,11 +108,10 @@
 +    chmod 0644, $file;
 +    unlink($file);
 +
-+    my $fh = gensym();
-+    open($fh, ">$file") ||
++    open(my $fh, ">$file") ||
 +        die "Cannot write to $file: $!";
 +
-+    foreach my $p (@$known_parsers) {
++    foreach my $p (@{ $class->parsers }) {
 +        print $fh "[$p->{Name}]\n";
 +        foreach my $key (keys %{$p->{Features}}) {
 +            print $fh "$key = $p->{Features}{$key}\n";
@@ -104,6 +126,4 @@
 +    return $class;
 +}
 +
- sub do_warn {
-     my $class = shift;
-     # Don't output warnings if running under Test::Harness
++1;

Modified: trunk/libxml-sax-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/debian/rules?rev=49916&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/rules (original)
+++ trunk/libxml-sax-perl/debian/rules Sat Jan  2 10:28:46 2010
@@ -1,31 +1,8 @@
 #!/usr/bin/make -f
-
-include /usr/share/quilt/quilt.make
-
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
-	dh build
-	touch $@
-
-clean: unpatch
-	[ ! -f Makefile ] || touch Makefile
-	dh $@
-
-install: install-stamp
-install-stamp: build-stamp
-	dh install
-	touch $@
+%:
+	dh --with quilt $@
 
 get-orig-source:
 	# debian/repack.pl: delete the file testfiles/xmltest.xml
 	chmod 755 debian/repack.pl
 	uscan --rename --force
-
-binary-arch:
-
-binary-indep: install
-	dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build

Modified: trunk/libxml-sax-perl/debian/update-perl-sax-parsers
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/debian/update-perl-sax-parsers?rev=49916&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/update-perl-sax-parsers (original)
+++ trunk/libxml-sax-perl/debian/update-perl-sax-parsers Sat Jan  2 10:28:46 2010
@@ -16,6 +16,7 @@
 use File::Spec;
 use Getopt::Long;
 use XML::SAX;
+use XML::SAX::Debian;
 use File::Temp qw(tempfile);
 
 ## ----------------------------------------------------------------------
@@ -94,21 +95,17 @@
 $file = $PARSER_DETAILS_FILE if ! $file;
 
 ## ----------------------------------------------------------------------
+unless (XML::SAX->can("_is_vendor_supplied")) {
+    print STDERR "$name: Non-vendor version of XML::SAX is installed.\n";
+    print STDERR "$name: Automatic registration of SAX parsers might not work.\n";
+}
+
 if ( $add )
 {
     print "$name: Registering Perl SAX parser $add with priority $priority...\n"
         unless $quiet;
     
-    if (XML::SAX->can('save_parsers_debian')) {
-        XML::SAX->save_parsers_debian( $add, $directory[0], $priority );
-    } else {
-        print STDERR <<EOF;
-Fatal: cannot call XML::SAX->save_parsers_debian(). 
-You probably have a locally installed XML::SAX module.
-See /usr/share/doc/libxml-sax-perl/README.Debian.gz .
-EOF
-        exit 1;
-    }
+    XML::SAX::Debian->save_parsers_debian( $add, $directory[0], $priority );
 }
 elsif ( $remove )
 {
@@ -188,7 +185,7 @@
 ## ----------------------------------------------------------------------
 sub version
 {
-    print "Debian $name version 0.3\n";
+    print "Debian $name version 0.4\n";
 }
 
 ## ----------------------------------------------------------------------




More information about the Pkg-perl-cvs-commits mailing list