Subject: | [PATCH] Parse error when description body contains a colon. |
Date: | Thu, 29 Apr 2010 17:09:09 +0900 |
To: | bug-Parse-Debian-Packages [...] rt.cpan.org |
From: | Ansgar Burchardt <ansgar [...] 43-1.org> |
Hi,
G. de la Rey submitted the attached bug report to Debian [1].
I separated the changes fixing the bug from those changing the API.
Please consider applying the attached patch in the next release.
Regards,
Ansgar
[1] <http://bugs.debian.org/579063>
From: "G. de la Rey" <debian@delarey.org>
Date: Sat, 24 Apr 2010 23:52:45 +0100
Bug-Debian: http://bugs.debian.org/579063
Subject: Fix error when description contains lines with colons
[ ansgar: Removed changes that would change the API. ]
Acked-by: Ansgar Burchardt <ansgar@43-1.org>
--- libparse-debian-packages-perl.orig/lib/Parse/Debian/Packages.pm
+++ libparse-debian-packages-perl/lib/Parse/Debian/Packages.pm
@@ -16,7 +16,7 @@
my %parsed;
while (<$fh>) {
last if /^$/;
- if (my ($key, $value) = m/^(.*): (.*)/) {
+ if (my ($key, $value) = m/^(\S*): (.*)/) {
$parsed{$key} = $value;
}
else {
Subject: | Bug#579063: libparse-debian-packages-perl: Parse error when description body contains a colon. |
To: | Debian Bug Tracking System <submit [...] bugs.debian.org> |
Date: | Sat, 24 Apr 2010 23:52:45 +0100 |
From: | "G. de la Rey" <debian [...] delarey.org> |
Package: libparse-debian-packages-perl
Version: 0.01-1
Severity: normal
Tags: patch
When there is a colon in the text description of a package, parsing fails
by treating it as if a key for the returned hash has been found. So as
well as the normal keys, such as Section, Filename, etc., some random keys
get created occasionally. For instance, the first package in the current
Packages file for sid, 2vcard, comes up with an unexpected key of
'and alias files from the following formats'.
The attached patch fixes this; it also makes next() return a reference to
%package rather than a copy of it, which seems to run more quickly.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-epos (PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libparse-debian-packages-perl depends on:
ii libyaml-perl 0.71-1 YAML Ain't Markup Language
ii perl 5.10.1-12 Larry Wall's Practical Extraction
libparse-debian-packages-perl recommends no packages.
libparse-debian-packages-perl suggests no packages.
-- no debconf information
Message body is not shown because sender requested not to inline it.
Show quoted text
_______________________________________________
pkg-perl-maintainers mailing list
pkg-perl-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-perl-maintainers