[Po4a-commits] "po-debconf podebconf-display-po,1.18,1.19"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sat Jun 7 16:24:45 UTC 2008


Update of /cvsroot/po4a/po-debconf
In directory alioth:/tmp/cvs-serv25688

Modified Files:
	podebconf-display-po 
Log Message:
  [ podebconf-display-po ]
  * Fix breakage when a string appears in multiple files. This removed the
    change applied to fix #375656, and forced the regular expression to be
    done on a temporary string so that the fields can be retrieved on the
    later execution (for the other line references). Closes: #484847


Index: podebconf-display-po
===================================================================
RCS file: /cvsroot/po4a/po-debconf/podebconf-display-po,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- podebconf-display-po	7 Jul 2007 16:06:16 -0000	1.18
+++ podebconf-display-po	7 Jun 2008 16:24:42 -0000	1.19
@@ -88,18 +88,19 @@
                 $rfc822Format = guessFormat($_) if $rfc822Format == 0;
                 while (s/#:\s*([^:\s]+):(\d+)/#:/) {
                         my ($file,$line) = ($1, $2);
+                        my $tmp = $_;
                         if ($rfc822Format == 1) {
                                 #  Old format
-                                1 while (s/^#\.\s+(.*)//m);
+                                1 while ($tmp =~ s/^#\.\s+(.*)//m);
                                 $field = $1;
                         } else {
                                 #  New format
-                                if (s/^#\. Type:\s*(\S+)\n//) {
+                                if ($tmp =~ s/^#\. Type:\s*(\S+)\n//) {
                                         $type = lc($1);
                                 }
                                 #  The entropy-text type is a plugin
                                 $type = "text" if $type eq "entropy-text";
-                                if (s/^#\. (\S+)\n//) {
+                                if ($tmp =~ s/^#\. (\S+)\n//) {
                                         $field = $1;
                                 }
                         }
@@ -128,7 +129,6 @@
                                         line => $line,
                                 };
                         }
-                        last if $rfc822Format < 3;
                 }
         }
         close(PO);




More information about the Po4a-commits mailing list