Просмотр исходного кода

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
Raphael Hertzog лет назад: 18
Родитель
Сommit
2726f44f7a
3 измененных файлов с 8 добавлено и 1 удалено
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 1 1
      scripts/Dpkg/Changelog/Debian.pm

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-05-08  Raphael Hertzog  <hertzog@debian.org>
+
+	* 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  <md@linux.it>
 
 	* scripts/Dpkg/Source/Patch.pm: Add missing import of internerr.

+ 2 - 0
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.

+ 1 - 1
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';