[texinfo] Fix bug in parser

vcrhonek vcrhonek at fedoraproject.org
Tue Mar 5 13:58:15 UTC 2013


commit 9a27f22ab78338cf1bcb0f4725296ddf7419e9fa
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Tue Mar 5 14:58:09 2013 +0100

    Fix bug in parser

 texinfo-5.0-parser.patch |   20 ++++++++++++++++++++
 texinfo.spec             |    9 ++++++++-
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/texinfo-5.0-parser.patch b/texinfo-5.0-parser.patch
new file mode 100644
index 0000000..73d2e83
--- /dev/null
+++ b/texinfo-5.0-parser.patch
@@ -0,0 +1,20 @@
+diff -up texinfo-5.0/tp/Texinfo/Parser.pm.orig texinfo-5.0/tp/Texinfo/Parser.pm
+--- texinfo-5.0/tp/Texinfo/Parser.pm.orig	2013-02-15 00:01:44.000000000 +0100
++++ texinfo-5.0/tp/Texinfo/Parser.pm	2013-03-05 14:33:25.384193273 +0100
+@@ -1631,9 +1631,13 @@ sub _close_current($$$;$$)
+           my $conditional = pop @{$current->{'parent'}->{'contents'}};
+         }
+       }
+-      my $context = pop @{$self->{'context_stack'}} if
+-         ($preformatted_commands{$current->{'cmdname'}}
+-           or $menu_commands{$current->{'cmdname'}});
++      if ($preformatted_commands{$current->{'cmdname'}}
++          or $menu_commands{$current->{'cmdname'}}
++          or $format_raw_commands{$current->{'cmdname'}}) {
++        my $context = pop @{$self->{'context_stack'}};
++        pop @{$self->{'raw_formats_stack'}} 
++          if ($format_raw_commands{$current->{'cmdname'}});
++      }
+       pop @{$self->{'regions_stack'}} 
+          if ($region_commands{$current->{'cmdname'}});
+       $current = $current->{'parent'};
diff --git a/texinfo.spec b/texinfo.spec
index 5f06758..2d62b89 100644
--- a/texinfo.spec
+++ b/texinfo.spec
@@ -3,7 +3,7 @@
 Summary: Tools needed to create Texinfo format documentation files
 Name: texinfo
 Version: 5.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+
 Group: Applications/Publishing
 Url: http://www.gnu.org/software/texinfo/
@@ -12,6 +12,8 @@ Source1: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz.sig
 Source2: info-dir
 Patch0: texinfo-4.12-zlib.patch
 Patch1: texinfo-4.13a-powerpc.patch
+# Backported from upstream
+Patch2: texinfo-5.0-parser.patch
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 Requires: perl >= 5.7.3, perl(Text::Unidecode)
@@ -57,6 +59,7 @@ for printing using TeX.
 %setup -q
 %patch0 -p1 -b .zlib
 %patch1 -p1 -b .powerpc
+%patch2 -p1 -b .parser
 
 %build
 %configure --with-external-Text-Unidecode \
@@ -151,6 +154,10 @@ fi
 %{_mandir}/man1/pdftexi2dvi.1*
 
 %changelog
+* Tue Mar 05 2013 Vitezslav Crhonek <vcrhonek at redhat.com> - 5.0-3
+- Fix bug in parser
+  Resolves: #917974
+
 * Wed Feb 20 2013 Vitezslav Crhonek <vcrhonek at redhat.com> - 5.0-2
 - Fix configure arguments, remove ChangeLog conversion,
   move texi2any/pod2texi to main package


More information about the scm-commits mailing list