From 2726f44f7a07576f10cfadc94158f672f9a51b14 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Thu, 8 May 2008 17:40:33 +0200 Subject: [PATCH] Dpkg::Changelog::Debian: bugfix in changelog parser * scripts/Dpkg/Changelog/Debian.pm (parse): Bugfix in creation of an unexpected new changelog entry that lacks an heading line. Closes: #478925 --- ChangeLog | 5 +++++ debian/changelog | 2 ++ scripts/Dpkg/Changelog/Debian.pm | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cb94717d..961e4df8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-08 Raphael Hertzog + + * scripts/Dpkg/Changelog/Debian.pm (parse): Bugfix in creation of + an unexpected new changelog entry that lacks an header line. + 2008-05-04 Marco d'Itri * scripts/Dpkg/Source/Patch.pm: Add missing import of internerr. diff --git a/debian/changelog b/debian/changelog index 4d863d20..6c525937 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ dpkg (1.14.19) UNRELEASED; urgency=low For example "1.0" and "1.1" would both map to Dpkg::Source::Package::V1 instead of ::V1_0 and ::V1_1 before. Similarly "3.0 (quilt)" now maps to ::V3::quilt instead of ::V3_0::quilt. + * Fix changelog parser to not fail when an unexpected changelog entry + appears without the preceding heading line. Closes: #478925 [ Helge Kreutzmann ] * Minor fixes and clarifications to man pages. diff --git a/scripts/Dpkg/Changelog/Debian.pm b/scripts/Dpkg/Changelog/Debian.pm index b9a4b033..d1ec41eb 100644 --- a/scripts/Dpkg/Changelog/Debian.pm +++ b/scripts/Dpkg/Changelog/Debian.pm @@ -256,7 +256,7 @@ sub parse { $entry->{'Closes'} = find_closes( $entry->{Changes} ); # print STDERR, Dumper($entry); push @{$self->{data}}, $entry; - $entry = Dpkg::Changelog::Entry->init(); + $entry = new Dpkg::Changelog::Entry; $entry->{Source} = $entry->{Distribution} = $entry->{Urgency} = $entry->{Urgency_LC} = 'unknown'; -- 2.39.5