Commit 765809cb authored by Felix Lechner's avatar Felix Lechner Committed by Chris Lamb

In Lintian::Collect::Source, use new changelog parser.

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

Gbp-Dch: ignore
parent 2274c035
......@@ -25,11 +25,11 @@ use parent 'Lintian::Collect::Package';
use Carp qw(croak);
use Scalar::Util qw(blessed);
use Lintian::Relation;
use Parse::DebianChangelog;
use Path::Tiny;
use Lintian::Deb822Parser qw(read_dpkg_control);
use Lintian::Info::Changelog;
use Lintian::Relation;
use Lintian::Util
qw(get_file_checksum open_gz $PKGNAME_REGEX $PKGREPACK_REGEX strip);
......@@ -110,8 +110,9 @@ sub changelog {
$changelog = $shared->{'changelog'}{$checksum};
}
if (not $changelog) {
my %opts = (infile => $dch->fs_path, quiet => 1);
$changelog = Parse::DebianChangelog->init(\%opts);
my $contents = path($dch->fs_path)->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