This is an automated email from the git hooks/post-receive script. gregoa pushed a commit to branch master in repository libxml-xpath-perl.
commit 7a5d711c09e2d7800975a74c5ebefd00afb65803 Author: gregor herrmann <gre...@debian.org> Date: Sun Feb 14 16:19:25 2016 +0100 Drop patches merged upstream. (fix_comparison_bug_RT6363.patch, make-and-commutative.patch) --- debian/patches/fix_comparison_bug_RT6363.patch | 100 ------------------------- debian/patches/make-and-commutative.patch | 58 -------------- debian/patches/series | 2 - 3 files changed, 160 deletions(-) diff --git a/debian/patches/fix_comparison_bug_RT6363.patch b/debian/patches/fix_comparison_bug_RT6363.patch deleted file mode 100644 index a0e81aa..0000000 --- a/debian/patches/fix_comparison_bug_RT6363.patch +++ /dev/null @@ -1,100 +0,0 @@ -Description: Fix using < in a query returns results as if <= had been used -Bug-Debian: https://bugs.debian.org/374672 -Bug: https://rt.cpan.org/Public/Bug/Display.html?id=6363 -Author: mi...@cpan.org - ---- a/lib/XML/XPath/Expr.pm -+++ b/lib/XML/XPath/Expr.pm -@@ -331,7 +331,7 @@ - - sub op_le { - my ($node, $lhs, $rhs) = @_; -- op_gt($node, $rhs, $lhs); -+ op_ge($node, $rhs, $lhs); - } - - sub op_ge { -@@ -360,31 +360,21 @@ - !$rh_results->isa('XML::XPath::NodeSet'))) { - # (that says: one is a nodeset, and one is not a nodeset) - -- my ($nodeset, $other); -- my ($true, $false); - if ($lh_results->isa('XML::XPath::NodeSet')) { -- $nodeset = $lh_results; -- $other = $rh_results; -- # we do this because unlike ==, these ops are direction dependant -- ($false, $true) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True); -+ foreach my $node ($lh_results->get_nodelist) { -+ if ($node->to_number->value >= $rh_results->to_number->value) { -+ return XML::XPath::Boolean->True; -+ } -+ } - } - else { -- $nodeset = $rh_results; -- $other = $lh_results; -- # ditto above comment -- ($true, $false) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True); -- } -- -- # True if and only if there is a node in the -- # nodeset such that the result of performing -- # the comparison on <type>(string_value($node)) -- # is true. -- foreach my $node ($nodeset->get_nodelist) { -- if ($node->to_number->value >= $other->to_number->value) { -- return $true; -+ foreach my $node ($rh_results->get_nodelist) { -+ if ( $lh_results->to_number->value >= $node->to_number->value) { -+ return XML::XPath::Boolean->True; -+ } - } - } -- return $false; -+ return XML::XPath::Boolean->False; - } - else { # Neither is a nodeset - if ($lh_results->isa('XML::XPath::Boolean') || -@@ -430,31 +420,21 @@ - !$rh_results->isa('XML::XPath::NodeSet'))) { - # (that says: one is a nodeset, and one is not a nodeset) - -- my ($nodeset, $other); -- my ($true, $false); - if ($lh_results->isa('XML::XPath::NodeSet')) { -- $nodeset = $lh_results; -- $other = $rh_results; -- # we do this because unlike ==, these ops are direction dependant -- ($false, $true) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True); -+ foreach my $node ($lh_results->get_nodelist) { -+ if ($node->to_number->value > $rh_results->to_number->value) { -+ return XML::XPath::Boolean->True; -+ } -+ } - } - else { -- $nodeset = $rh_results; -- $other = $lh_results; -- # ditto above comment -- ($true, $false) = (XML::XPath::Boolean->False, XML::XPath::Boolean->True); -- } -- -- # True if and only if there is a node in the -- # nodeset such that the result of performing -- # the comparison on <type>(string_value($node)) -- # is true. -- foreach my $node ($nodeset->get_nodelist) { -- if ($node->to_number->value > $other->to_number->value) { -- return $true; -+ foreach my $node ($rh_results->get_nodelist) { -+ if ( $lh_results->to_number->value > $node->to_number->value) { -+ return XML::XPath::Boolean->True; -+ } - } - } -- return $false; -+ return XML::XPath::Boolean->False; - } - else { # Neither is a nodeset - if ($lh_results->isa('XML::XPath::Boolean') || diff --git a/debian/patches/make-and-commutative.patch b/debian/patches/make-and-commutative.patch deleted file mode 100644 index ea9f905..0000000 --- a/debian/patches/make-and-commutative.patch +++ /dev/null @@ -1,58 +0,0 @@ -Description: "and" in XPath should be commutative - Fixes "Can't call method "size" on an undefined value" error. -Author: Niko Tyni <nt...@debian.org> -Bug-Debian: https://bugs.debian.org/187583 -Bug: http://rt.cpan.org/Public/Bug/Display.html?id=32012 -Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=187583;filename=187583.patch;att=1;msg=22 - ---- a/lib/XML/XPath/Step.pm -+++ b/lib/XML/XPath/Step.pm -@@ -131,6 +131,8 @@ - my $from = shift; # context nodeset - - # warn "Step::evaluate called with ", $from->size, " length nodeset\n"; -+ my $saved_context = $self->{pp}->get_context_set; -+ my $saved_pos = $self->{pp}->get_context_pos; - - $self->{pp}->set_context_set($from); - -@@ -150,7 +152,8 @@ - - # warn "Step::evaluate initial nodeset size: ", $initial_nodeset->size, "\n"; - -- $self->{pp}->set_context_set(undef); -+ $self->{pp}->set_context_set($saved_context); -+ $self->{pp}->set_context_pos($saved_pos); - - $initial_nodeset->sort; - ---- /dev/null -+++ b/t/32context.t -@@ -0,0 +1,27 @@ -+use Test; -+BEGIN { plan tests => 4 } -+ -+use XML::XPath; -+ok(1); -+ -+my $xp = XML::XPath->new(ioref => *DATA); -+ok($xp); -+ -+# Debian bug #187583, http://bugs.debian.org/187583 -+# Check that evaluation doesn't lose the context information -+ -+my $nodes = $xp->find("text/para/node()[position()=last() and preceding-sibling::important]"); -+ok("$nodes", " has a preceding sibling."); -+ -+$nodes = $xp->find("text/para/node()[preceding-sibling::important and position()=last()]"); -+ok("$nodes", " has a preceding sibling."); -+ -+__DATA__ -+<text> -+ <para>I start the text here, I break -+the line and I go on, I <blink>twinkle</blink> and then I go on -+ again. -+This is not a new paragraph.</para><para>This is a -+ <important>new</important> paragraph and -+ <blink>this word</blink> has a preceding sibling.</para> -+</text> diff --git a/debian/patches/series b/debian/patches/series index 21b65ae..bead183 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,4 @@ -fix_comparison_bug_RT6363.patch example.patch test.patch fix-stringification-overload.patch -make-and-commutative.patch xpath-option-to-work-without-internet-connection.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libxml-xpath-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits