Author: adam-guest
Date: 2008-02-22 19:31:22 +0000 (Fri, 22 Feb 2008)
New Revision: 1042

Modified:
   trunk/debian/changelog
   trunk/scripts/debchange.pl
Log:
  - Use existing changelog data directly rather than re-using
    dpkg-parsechangelog's Changes: field and therefore don't apply any
    reformatting (Closes: #452806)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-02-22 00:49:52 UTC (rev 1041)
+++ trunk/debian/changelog      2008-02-22 19:31:22 UTC (rev 1042)
@@ -35,6 +35,9 @@
   * debchange:
     - Modify --closes to use SOAP / Debbugs.pm
     - Add hardy (heron) to the list of supported Ubuntu distributions
+    - Use existing changelog data directly rather than re-using
+      dpkg-parsechangelog's Changes: field and therefore don't apply any
+      reformatting (Closes: #452806)
 
   [ Christoph Berg ]
   * dget:

Modified: trunk/scripts/debchange.pl
===================================================================
--- trunk/scripts/debchange.pl  2008-02-22 00:49:52 UTC (rev 1041)
+++ trunk/scripts/debchange.pl  2008-02-22 19:31:22 UTC (rev 1042)
@@ -483,7 +483,6 @@
     $DISTRIBUTION=$changelog{'Distribution'};
     fatal "No changes in changelog!"
        unless exists $changelog{'Changes'};
-    $CHANGES=$changelog{'Changes'};
 
     # Find the current package version
     if ($opt_news) {
@@ -784,6 +783,20 @@
 # Open in anticipation....
 unless ($opt_create) {
     open S, $changelog_path or fatal "Cannot open existing $changelog_path: 
$!";
+
+    # Read the first stanza from the changelog file
+    # We do this directly rather than reusing $changelog{'Changes'}
+    # so that we have the verbatim changes rather than a (albeit very
+    # slightly) reformatted version. See Debian bug #452806
+
+    while(<S>) {
+       last if /^ --/;
+
+       $CHANGES .= $_;
+    }
+
+    # Reset file pointer
+    seek(S, 0, 0);
 }
 open O, ">$changelog_path.dch"
     or fatal "Cannot write to temporary file: $!";



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

Reply via email to