From: Jordan Metzmeier
Date: Sun, 24 May 2015 14:56:33 +0000
Subject: Fix test failures due to changed Changes field.
Bug-Debian: https://bugs.debian.org/753034
---
 lib/Parse/DebianChangelog/Util.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/Parse/DebianChangelog/Util.pm b/lib/Parse/DebianChangelog/Util.pm
index 9086249..6f77546 100644
--- a/lib/Parse/DebianChangelog/Util.pm
+++ b/lib/Parse/DebianChangelog/Util.pm
@@ -104,7 +104,11 @@ sub data2rfc822 {
 	$v =~ m/\n$/o && warn(__g("field %s has trailing newline >%s<",
 				  $f, $v ));
 	$v =~ s/\$\{\}/\$/go;
-	$rfc822_str .= "$f: $v\n";
+        # the changes have a space followed by a newline which was resulting
+        # in a trailing space on "Changes: ". This caused the library to not
+        # match the output of dpkg-parsechangelog
+        $v = ' ' . $v if $v !~ m/^\s+/;
+	$rfc822_str .= "$f:$v\n";
     }
 
     return $rfc822_str;
