r9855 - in /trunk/libxml-sax-perl: Makefile.PL SAX.pm debian/changelog debian/patches/parserdetails-debian debian/patches/series t/01known.t t/99cleanup.t
ntyni-guest at users.alioth.debian.org
ntyni-guest at users.alioth.debian.org
Tue Nov 27 19:00:51 UTC 2007
Author: ntyni-guest
Date: Tue Nov 27 19:00:51 2007
New Revision: 9855
URL: http://svn.debian.org/wsvn/?sc=1&rev=9855
Log:
convert the ParserDetails.ini handling modifications to quilt
Added:
trunk/libxml-sax-perl/debian/patches/parserdetails-debian
Modified:
trunk/libxml-sax-perl/Makefile.PL
trunk/libxml-sax-perl/SAX.pm
trunk/libxml-sax-perl/debian/changelog
trunk/libxml-sax-perl/debian/patches/series
trunk/libxml-sax-perl/t/01known.t
trunk/libxml-sax-perl/t/99cleanup.t
Modified: trunk/libxml-sax-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/Makefile.PL?rev=9855&op=diff
==============================================================================
--- trunk/libxml-sax-perl/Makefile.PL (original)
+++ trunk/libxml-sax-perl/Makefile.PL Tue Nov 27 19:00:51 2007
@@ -16,10 +16,6 @@
package MY;
my $script = shift->SUPER::install(@_);
- print STDERR "Debian build: won't modify ParserDetails.ini when installing.\n";
- print STDERR " (use update-perl-sax-parsers(8) instead.)\n";
- return $script;
-
# Only modify existing ParserDetails.ini if user agrees
my $write_ini_ok = 0;
Modified: trunk/libxml-sax-perl/SAX.pm
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/SAX.pm?rev=9855&op=diff
==============================================================================
--- trunk/libxml-sax-perl/SAX.pm (original)
+++ trunk/libxml-sax-perl/SAX.pm Tue Nov 27 19:00:51 2007
@@ -179,54 +179,11 @@
sub save_parsers {
my $class = shift;
- ### DEBIAN MODIFICATION
- print "\n";
- print "Please use 'update-perl-sax-parsers(8) to register this parser.'\n";
- print "See /usr/share/doc/libxml-sax-perl/README.Debian.gz for more info.\n";
- print "\n";
-
- return $class; # rest of the function is disabled on Debian.
- ### END DEBIAN MODIFICATION
-
# get directory from wherever XML::SAX is installed
my $dir = $INC{'XML/SAX.pm'};
$dir = dirname($dir);
my $file = File::Spec->catfile($dir, "SAX", PARSER_DETAILS);
- chmod 0644, $file;
- unlink($file);
-
- my $fh = gensym();
- open($fh, ">$file") ||
- die "Cannot write to $file: $!";
-
- foreach my $p (@$known_parsers) {
- print $fh "[$p->{Name}]\n";
- foreach my $key (keys %{$p->{Features}}) {
- print $fh "$key = $p->{Features}{$key}\n";
- }
- print $fh "\n";
- }
-
- print $fh "\n";
-
- close $fh;
-
- return $class;
-}
-
-sub save_parsers_debian {
- my $class = shift;
- my ($parser_module,$directory, $priority) = @_;
-
- # add parser
- $known_parsers = [];
- $class->add_parser($parser_module);
-
- # get parser's ParserDetails file
- my $file = $parser_module;
- $file = "${priority}-$file" if $priority != 0;
- $file = File::Spec->catfile($directory, $file);
chmod 0644, $file;
unlink($file);
Modified: trunk/libxml-sax-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/debian/changelog?rev=9855&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/changelog (original)
+++ trunk/libxml-sax-perl/debian/changelog Tue Nov 27 19:00:51 2007
@@ -29,12 +29,13 @@
* Move the examples under debian/, they are Debian-specific.
* Use quilt to manage debian/patches.
+ charset-decoding: Fix charset decoding in the PurePerl module (#405186)
+ + parserdetails-debian: The Debian way of handling ParserDetails.ini
* Move update-perl-sax-parsers under debian/ in the source package, it's
Debian-specific.
* Remove an unused Debian modification: XML::SAX->load_parsers() doesn't
accept the '$file' argument anymore.
- -- Niko Tyni <ntyni at iki.fi> Sun, 25 Nov 2007 18:22:03 +0200
+ -- Niko Tyni <ntyni at iki.fi> Sun, 25 Nov 2007 18:29:27 +0200
libxml-sax-perl (0.16-0.1) unstable; urgency=low
Added: trunk/libxml-sax-perl/debian/patches/parserdetails-debian
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/debian/patches/parserdetails-debian?rev=9855&op=file
==============================================================================
--- trunk/libxml-sax-perl/debian/patches/parserdetails-debian (added)
+++ trunk/libxml-sax-perl/debian/patches/parserdetails-debian Tue Nov 27 19:00:51 2007
@@ -1,0 +1,109 @@
+The Debian way of handling ParserDetails.ini: use
+update-perl-sax-parsers(8) instead.
+
+* SAX.pm: the meat of the modifications
+ + add XML::SAX->save_parsers_debian(), used by update-perl-sax-parsers
+ + disable XML::SAX->save_parsers() with a helpful error message for
+ users trying to install SAX parsers manually from CPAN
+* Makefile.PL: Don't try to modify ParserDetails.ini when building the package
+* t/01known.t, t/99cleanup.t: Skip tests related to XML::SAX->save_parsers()
+
+Originally by Ardo van Rangelrooij <ardo at debian.org>
+Cleanups and quilt conversion by Niko Tyni <ntyni at iki.fi>
+
+--- libxml-sax-perl-0.16.orig/t/01known.t
++++ libxml-sax-perl-0.16/t/01known.t
+@@ -1,6 +1,9 @@
+-use Test;
++use Test::More;
+ BEGIN { plan tests => 3 }
++SKIP: {
++skip 'Tests skipped due to Debian modifications', 3;
+ use XML::SAX;
+ ok(XML::SAX->save_parsers);
+ ok(XML::SAX->load_parsers);
+ ok(@{XML::SAX->parsers}, 0);
++}
+--- libxml-sax-perl-0.16.orig/t/99cleanup.t
++++ libxml-sax-perl-0.16/t/99cleanup.t
+@@ -1,7 +1,7 @@
+ use Test;
+ BEGIN { plan tests => 1 }
+ use File::Spec;
+-ok(unlink(
++skip('Test skipped due to Debian modifications', unlink(
+ File::Spec->catdir(qw(blib lib XML SAX ParserDetails.ini))),
+ 1,
+ 'delete ParserDetails.ini'
+--- libxml-sax-perl-0.16.orig/Makefile.PL
++++ libxml-sax-perl-0.16/Makefile.PL
+@@ -16,6 +16,10 @@
+ package MY;
+ my $script = shift->SUPER::install(@_);
+
++ print STDERR "Debian build: won't modify ParserDetails.ini when installing.\n";
++ print STDERR " (use update-perl-sax-parsers(8) instead.)\n";
++ return $script;
++
+ # Only modify existing ParserDetails.ini if user agrees
+
+ my $write_ini_ok = 0;
+--- libxml-sax-perl-0.16.orig/SAX.pm
++++ libxml-sax-perl-0.16/SAX.pm
+@@ -179,6 +179,15 @@
+ sub save_parsers {
+ my $class = shift;
+
++ ### DEBIAN MODIFICATION
++ print "\n";
++ print "Please use 'update-perl-sax-parsers(8) to register this parser.'\n";
++ print "See /usr/share/doc/libxml-sax-perl/README.Debian.gz for more info.\n";
++ print "\n";
++
++ return $class; # rest of the function is disabled on Debian.
++ ### END DEBIAN MODIFICATION
++
+ # get directory from wherever XML::SAX is installed
+ my $dir = $INC{'XML/SAX.pm'};
+ $dir = dirname($dir);
+@@ -206,6 +215,40 @@
+ return $class;
+ }
+
++sub save_parsers_debian {
++ my $class = shift;
++ my ($parser_module,$directory, $priority) = @_;
++
++ # add parser
++ $known_parsers = [];
++ $class->add_parser($parser_module);
++
++ # get parser's ParserDetails file
++ my $file = $parser_module;
++ $file = "${priority}-$file" if $priority != 0;
++ $file = File::Spec->catfile($directory, $file);
++ chmod 0644, $file;
++ unlink($file);
++
++ my $fh = gensym();
++ open($fh, ">$file") ||
++ die "Cannot write to $file: $!";
++
++ foreach my $p (@$known_parsers) {
++ print $fh "[$p->{Name}]\n";
++ foreach my $key (keys %{$p->{Features}}) {
++ print $fh "$key = $p->{Features}{$key}\n";
++ }
++ print $fh "\n";
++ }
++
++ print $fh "\n";
++
++ close $fh;
++
++ return $class;
++}
++
+ sub do_warn {
+ my $class = shift;
+ # Don't output warnings if running under Test::Harness
Modified: trunk/libxml-sax-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/debian/patches/series?rev=9855&op=diff
==============================================================================
--- trunk/libxml-sax-perl/debian/patches/series (original)
+++ trunk/libxml-sax-perl/debian/patches/series Tue Nov 27 19:00:51 2007
@@ -1,1 +1,2 @@
charset-decoding
+parserdetails-debian
Modified: trunk/libxml-sax-perl/t/01known.t
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/t/01known.t?rev=9855&op=diff
==============================================================================
--- trunk/libxml-sax-perl/t/01known.t (original)
+++ trunk/libxml-sax-perl/t/01known.t Tue Nov 27 19:00:51 2007
@@ -1,9 +1,6 @@
-use Test::More;
+use Test;
BEGIN { plan tests => 3 }
-SKIP: {
-skip 'Tests skipped due to Debian modifications', 3;
use XML::SAX;
ok(XML::SAX->save_parsers);
ok(XML::SAX->load_parsers);
ok(@{XML::SAX->parsers}, 0);
-}
Modified: trunk/libxml-sax-perl/t/99cleanup.t
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/t/99cleanup.t?rev=9855&op=diff
==============================================================================
--- trunk/libxml-sax-perl/t/99cleanup.t (original)
+++ trunk/libxml-sax-perl/t/99cleanup.t Tue Nov 27 19:00:51 2007
@@ -1,7 +1,7 @@
use Test;
BEGIN { plan tests => 1 }
use File::Spec;
-skip('Test skipped due to Debian modifications', unlink(
+ok(unlink(
File::Spec->catdir(qw(blib lib XML SAX ParserDetails.ini))),
1,
'delete ParserDetails.ini'
More information about the Pkg-perl-cvs-commits
mailing list