Author: adam-guest
Date: 2008-02-29 06:50:44 +0000 (Fri, 29 Feb 2008)
New Revision: 1082

Modified:
   trunk/debian/changelog
   trunk/scripts/debchange.pl
Log:
debchange: Fix an off-by-one in the fix for #452806 that caused an
  extra blank line to be added before the trailer line

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-02-29 06:41:02 UTC (rev 1081)
+++ trunk/debian/changelog      2008-02-29 06:50:44 UTC (rev 1082)
@@ -7,6 +7,8 @@
   * checkbashisms: Fix a couple of brown paper bag issues with the >&file
     and herestring checks added in the last release. Thanks to Raphael
     Geissert for spotting the breakage so quickly.
+  * debchange: Fix an off-by-one in the fix for #452806 that caused an
+    extra blank line to be added before the trailer line
 
  -- Patrick Schoenfeld <[EMAIL PROTECTED]>  Thu, 28 Feb 2008 20:34:18 +0100
 

Modified: trunk/scripts/debchange.pl
===================================================================
--- trunk/scripts/debchange.pl  2008-02-29 06:41:02 UTC (rev 1081)
+++ trunk/scripts/debchange.pl  2008-02-29 06:50:44 UTC (rev 1082)
@@ -792,7 +792,18 @@
     while(<S>) {
        last if /^ --/;
 
-       $CHANGES .= $_;
+       if (/^\s*$/) {
+           my $first = $_;
+           my $next = <S>;
+           if ($next !~ /^ --/) {
+               $CHANGES .= $first;
+           } else {
+               last;
+           }
+           $CHANGES .= $next;
+       } else {
+            $CHANGES .= $_;
+       }
     }
 
     # Reset file pointer



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to