[libparse-debian-packages-perl] 01/02: Add patch to fix handling of multiline fields.
gregor herrmann
gregoa at debian.org
Fri Feb 28 14:46:42 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libparse-debian-packages-perl.
commit 240982a06183d1598559df1de6cbc93e2c5ac95a
Author: gregor herrmann <gregoa at debian.org>
Date: Fri Feb 28 15:45:42 2014 +0100
Add patch to fix handling of multiline fields.
Thanks: Simon Kainz for the bug report and the initial patch.
Closes: #695274
---
debian/patches/fix_multiline_fields.patch | 33 +++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 34 insertions(+)
diff --git a/debian/patches/fix_multiline_fields.patch b/debian/patches/fix_multiline_fields.patch
new file mode 100644
index 0000000..c5e7f33
--- /dev/null
+++ b/debian/patches/fix_multiline_fields.patch
@@ -0,0 +1,33 @@
+Description: fix handling of lines starting with whitespace
+ - they are continuation lines of header fields now
+ - there is no "body" (description) in the Packages file anymore
+Origin: vendor
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=81744
+Bug-Debian: https://bugs.debian.org/695274
+Forwarded: not-yet
+Author: Simon Kainz <simon at familiekainz.at>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-02-28
+
+--- a/lib/Parse/Debian/Packages.pm
++++ b/lib/Parse/Debian/Packages.pm
+@@ -14,15 +14,18 @@
+ my $fh = $self->{fh};
+
+ my %parsed;
++ my $lastkey;
+ while (<$fh>) {
+ last if /^$/;
+ if (my ($key, $value) = m/^(\S+): (.*)/) {
+ $parsed{$key} = $value;
++ $lastkey=$key;
+ }
+ else {
+ s/ //;
+ s/^\.$//;
+- $parsed{body} .= $_;
++ chomp;
++ $parsed{$lastkey} .= "\n" . $_;
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9a4b79a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_multiline_fields.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libparse-debian-packages-perl.git
More information about the Pkg-perl-cvs-commits
mailing list