[Reproducible-commits] [dpkg] 06/17: Dpkg::Control::HashCore: Remove trailing space before handling dot-separators
Holger Levsen
holger at layer-acht.org
Tue May 3 08:44:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to annotated tag 1.17.27
in repository dpkg.
commit a6ce9fa253b013e5c11d144e1f49f153af2f62b0
Author: Guillem Jover <guillem at debian.org>
Date: Mon Jun 22 13:15:03 2015 +0200
Dpkg::Control::HashCore: Remove trailing space before handling dot-separators
Regression introduced in commit b4ccfe4982161b8beb44f1d0c98f791c4f238edd.
Any spaces after the blank line dot-separator should be stripped before
handling the dot-separator, otherwise we get duplicated dots in field
contents.
Closes: #789580
---
debian/changelog | 3 +++
scripts/Dpkg/Control/HashCore.pm | 2 +-
scripts/t/Dpkg_Control.t | 2 ++
scripts/t/Dpkg_Control/control-1 | 1 +
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index f1487d0..1072c1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ dpkg (1.17.27) UNRELEASED; urgency=medium
* Add more Conflicts for removed packages expecting dpkg to ship
install-info. Namely ada-mode and octave2.1-info. Closes: #783657
Thanks to Andreas Beckmann <anbe at debian.org>.
+ * Remove trailing space before handling blank line dot-separator in
+ Dpkg::Control::HashCore. Regression introduced in dpkg 1.17.25.
+ Reported by Jakub Wilk <jwilk at debian.org>. Closes: #789580
[ Updated scripts translations ]
* German (Helge Kreutzmann). (Various fixes)
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index d9e0373..6ed6b40 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -219,10 +219,10 @@ sub parse {
unless (defined($cf)) {
$self->parse_error($desc, _g('continued value line not in field'));
}
+ $line =~ s/\s*$//;
if ($line =~ /^\.+$/) {
$line = substr $line, 1;
}
- $line =~ s/\s*$//;
$self->{$cf} .= "\n$line";
} elsif (m/^-----BEGIN PGP SIGNED MESSAGE-----[\r\t ]*$/) {
$expect_pgp_sig = 1;
diff --git a/scripts/t/Dpkg_Control.t b/scripts/t/Dpkg_Control.t
index 1507678..07a3fb8 100644
--- a/scripts/t/Dpkg_Control.t
+++ b/scripts/t/Dpkg_Control.t
@@ -52,6 +52,7 @@ Long-Field: line1
line 2 line 2 line 2
.
line 3 line 3 line 3
+ .
..
line 4
Empty-Field:
@@ -82,6 +83,7 @@ is($src->{'long-field'},
line 2 line 2 line 2
line 3 line 3 line 3
+
.
line 4', 'Get multi-line field');
is($src->{'Empty-field'}, '', 'Get empty field');
diff --git a/scripts/t/Dpkg_Control/control-1 b/scripts/t/Dpkg_Control/control-1
index afe618e..0c70533 100644
--- a/scripts/t/Dpkg_Control/control-1
+++ b/scripts/t/Dpkg_Control/control-1
@@ -7,6 +7,7 @@ long-field: line1
line 2 line 2 line 2
.
line 3 line 3 line 3
+ .
..
line 4
empty-field:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list