Commit 2274c035 authored by Felix Lechner's avatar Felix Lechner Committed by Chris Lamb

In Lintian::Collect::Binary, use the new changelog parser.

In response to Bug#933134, the changelog parser became part of
Lintian. This commit uses it in Lintian::Collect::Binary.

Gbp-Dch: ignore
parent e033c668
......@@ -25,11 +25,12 @@ use warnings;
use autodie;
use parent 'Lintian::Collect::Package';
use Lintian::Relation;
use Carp qw(croak);
use Parse::DebianChangelog;
use Path::Tiny;
use Lintian::Deb822Parser qw(parse_dpkg_control);
use Lintian::Info::Changelog;
use Lintian::Relation;
use Lintian::Util qw(internal_error open_gz get_file_checksum strip);
=head1 NAME
......@@ -143,8 +144,9 @@ sub changelog {
$changelog = $shared->{'changelog'}{$checksum};
}
if (not $changelog) {
my %opts = (infile => $dch, quiet => 1);
$changelog = Parse::DebianChangelog->init(\%opts);
my $contents = path($dch)->slurp;
$changelog = Lintian::Info::Changelog->new;
$changelog->parse($contents);
if (defined($shared)) {
$shared->{'changelog'}{$checksum} = $changelog;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment