This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=6b15c47b743b425d3577689c26ef74ac37fcf0fa commit 6b15c47b743b425d3577689c26ef74ac37fcf0fa Author: Guillem Jover <guil...@debian.org> AuthorDate: Wed Aug 5 10:35:27 2020 +0200 Dpkg::Changelog::Parse: Add new verbose option Prompted-by: #967911 --- scripts/Dpkg/Changelog/Parse.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/Dpkg/Changelog/Parse.pm b/scripts/Dpkg/Changelog/Parse.pm index 8140e25a6..6730f6996 100644 --- a/scripts/Dpkg/Changelog/Parse.pm +++ b/scripts/Dpkg/Changelog/Parse.pm @@ -33,7 +33,7 @@ package Dpkg::Changelog::Parse; use strict; use warnings; -our $VERSION = '2.00'; +our $VERSION = '2.01'; our @EXPORT = qw( changelog_parse ); @@ -79,7 +79,8 @@ This function will parse a changelog. In list context, it returns as many Dpkg::Control objects as the parser did create. In scalar context, it will return only the first one. If the parser did not return any data, it will return an empty list in list context or undef on scalar context. If the -parser failed, it will die. +parser failed, it will die. Any parse errors will be printed as warnings +on standard error, but this can be disabled by passing $opt{verbose} to 0. The changelog file that is parsed is F<debian/changelog> by default but it can be overridden with $opt{file}. The default output format is "dpkg" but @@ -104,6 +105,7 @@ All the other keys in %opt are forwarded to the parser module constructor. sub changelog_parse { my (%options) = @_; + $options{verbose} //= 1; $options{file} //= 'debian/changelog'; $options{label} //= $options{file}; $options{changelogformat} //= _changelog_detect_format($options{file}); @@ -129,7 +131,9 @@ sub changelog_parse { \$changes = Dpkg::Changelog::$format->new(); }; error(g_('changelog format %s is unknown: %s'), $format, $@) if $@; - $changes->set_options(reportfile => $options{label}, range => $range); + $changes->set_options(reportfile => $options{label}, + verbose => $options{verbose}, + range => $range); # Load and parse the changelog. $changes->load($options{file}, compression => $options{compression}) @@ -157,6 +161,10 @@ sub changelog_parse { =head1 CHANGES +=head2 Version 2.01 (dpkg 1.20.6) + +New option: 'verbose' in changelog_parse(). + =head2 Version 2.00 (dpkg 1.20.0) Remove functions: changelog_parse_debian(), changelog_parse_plugin(). -- Dpkg.Org's dpkg