This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
commit fe186374cd2a287723fe227fe37ea4a5373822c0 Author: Paul Wise <p...@debian.org> Date: Mon Dec 4 15:12:50 2017 +0800 Dpkg::Changelog: Print versions for incorrect changelog range warnings Within scripts operating on lots of different package changelogs, this can help track down where these warnings come from. Signed-off-by: Guillem Jover <guil...@debian.org> --- debian/changelog | 2 ++ scripts/Dpkg/Changelog.pm | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index cc537f8..8ed5546 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium - Dpkg::Vendor::Debian: Use proper %use_feature key. This was causing perl errors on paths not accapted for fixdebugpath. Reported by Mattia Rizzolo <mat...@debian.org>, on IRC. Closes: #881051 + - Dpkg::Changelog: Print versions for incorrect changelog range warnings. + Thanks to Paul Wise <p...@debian.org>. * Documentation: - Update gettext minimal version in README. - Add a missing dot on the dpkg-buildflags(1) «lfs» feature paragraph. diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm index db8e3eb..35e48ef 100644 --- a/scripts/Dpkg/Changelog.pm +++ b/scripts/Dpkg/Changelog.pm @@ -254,7 +254,7 @@ sub __sanity_check_range { push @versions, $version->as_string(); } if ((defined($r->{since}) and not exists $versions{$r->{since}})) { - warning(g_("'%s' option specifies non-existing version"), 'since'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'since', $r->{since}); warning(g_('use newest entry that is earlier than the one specified')); foreach my $v (@versions) { if (version_compare_relation($v, REL_LT, $r->{since})) { @@ -270,7 +270,7 @@ sub __sanity_check_range { } } if ((defined($r->{from}) and not exists $versions{$r->{from}})) { - warning(g_("'%s' option specifies non-existing version"), 'from'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'from', $r->{from}); warning(g_('use oldest entry that is later than the one specified')); my $oldest; foreach my $v (@versions) { @@ -281,12 +281,12 @@ sub __sanity_check_range { if (defined($oldest)) { $r->{from} = $oldest; } else { - warning(g_("no such entry found, ignoring '%s' parameter"), 'from'); + warning(g_("no such entry found, ignoring '%s' parameter '%s'"), 'from', $r->{from}); delete $r->{from}; # No version was oldest } } if (defined($r->{until}) and not exists $versions{$r->{until}}) { - warning(g_("'%s' option specifies non-existing version"), 'until'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'until', $r->{until}); warning(g_('use oldest entry that is later than the one specified')); my $oldest; foreach my $v (@versions) { @@ -297,12 +297,12 @@ sub __sanity_check_range { if (defined($oldest)) { $r->{until} = $oldest; } else { - warning(g_("no such entry found, ignoring '%s' parameter"), 'until'); + warning(g_("no such entry found, ignoring '%s' parameter '%s'"), 'until', $r->{until}); delete $r->{until}; # No version was oldest } } if (defined($r->{to}) and not exists $versions{$r->{to}}) { - warning(g_("'%s' option specifies non-existing version"), 'to'); + warning(g_("'%s' option specifies non-existing version '%s'"), 'to', $r->{to}); warning(g_('use newest entry that is earlier than the one specified')); foreach my $v (@versions) { if (version_compare_relation($v, REL_LT, $r->{to})) { @@ -312,17 +312,17 @@ sub __sanity_check_range { } if (not exists $versions{$r->{to}}) { # No version was earlier - warning(g_("no such entry found, ignoring '%s' parameter"), 'to'); + warning(g_("no such entry found, ignoring '%s' parameter '%s'"), 'to', $r->{to}); delete $r->{to}; } } if (defined($r->{since}) and $data->[0]->get_version() eq $r->{since}) { - warning(g_("'since' option specifies most recent version, ignoring")); + warning(g_("'since' option specifies most recent version '%s', ignoring"), $r->{since}); delete $r->{since}; } if (defined($r->{until}) and $data->[-1]->get_version() eq $r->{until}) { - warning(g_("'until' option specifies oldest version, ignoring")); + warning(g_("'until' option specifies oldest version '%s', ignoring"), $r->{until}); delete $r->{until}; } ## use critic -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/dpkg/dpkg.git