diff options
author | Guillem Jover <guillem@debian.org> | 2019-08-10 02:51:10 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-11-26 02:42:44 +0100 |
commit | 7656016155c2dc408c4659d050a6e4bedb741069 (patch) | |
tree | 5e98050d817dede49158e838e6e5542ad78c5aba | |
parent | e4fed400378c4ade6b7ceb3aeb03c4252c11c12e (diff) | |
download | dpkg-7656016155c2dc408c4659d050a6e4bedb741069.tar.gz |
Dpkg::Changelog::Parse: Remove warnings for obsolete options and functions
Remove warnings for obsolete options forceplugin and libdir. Remove
obsolete functions changelog_parse_debian() and changelog_parse_plugin().
Bump module version to 2.00.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | scripts/Dpkg/Changelog/Parse.pm | 60 |
2 files changed, 10 insertions, 53 deletions
diff --git a/debian/changelog b/debian/changelog index cfae6636c..69d274984 100644 --- a/debian/changelog +++ b/debian/changelog @@ -51,6 +51,9 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - Dpkg::Changelog: Remove obsolete methods dpkg() and rfc822(). - Dpkg::Changelog::Entry::Debian: Remove obsolete methods check_header() and check_trailer(). Hide variables $regex_header and $regex_trailer. + - Dpkg::Changelog::Parse: Remove warnings of obsolete options forceplugin + and libdir. Remove obsolete functions changelog_parse_debian() and + changelog_parse_plugin(). * Documentation: - man: Fix uncommon wording constructs. - man: Use a minus sign for a literal string. diff --git a/scripts/Dpkg/Changelog/Parse.pm b/scripts/Dpkg/Changelog/Parse.pm index 8bf099b00..8140e25a6 100644 --- a/scripts/Dpkg/Changelog/Parse.pm +++ b/scripts/Dpkg/Changelog/Parse.pm @@ -33,10 +33,8 @@ package Dpkg::Changelog::Parse; use strict; use warnings; -our $VERSION = '1.03'; +our $VERSION = '2.00'; our @EXPORT = qw( - changelog_parse_debian - changelog_parse_plugin changelog_parse ); @@ -75,40 +73,6 @@ sub _changelog_detect_format { =over 4 -=item $fields = changelog_parse_debian(%opt) - -This function is deprecated, use changelog_parse() instead, with the changelog -format set to "debian". - -=cut - -sub changelog_parse_debian { - my (%options) = @_; - - warnings::warnif('deprecated', - 'deprecated function changelog_parse_debian, use changelog_parse instead'); - - # Force the plugin to be debian. - $options{changelogformat} = 'debian'; - - return _changelog_parse(%options); -} - -=item $fields = changelog_parse_plugin(%opt) - -This function is deprecated, use changelog_parse() instead. - -=cut - -sub changelog_parse_plugin { - my (%options) = @_; - - warnings::warnif('deprecated', - 'deprecated function changelog_parse_plugin, use changelog_parse instead'); - - return _changelog_parse(%options); -} - =item $fields = changelog_parse(%opt) This function will parse a changelog. In list context, it returns as many @@ -137,15 +101,9 @@ All the other keys in %opt are forwarded to the parser module constructor. =cut -sub _changelog_parse { +sub changelog_parse { my (%options) = @_; - # Setup and sanity checks. - if (exists $options{libdir}) { - warnings::warnif('deprecated', - 'obsolete libdir option, changelog parsers are now perl modules'); - } - $options{file} //= 'debian/changelog'; $options{label} //= $options{file}; $options{changelogformat} //= _changelog_detect_format($options{file}); @@ -195,19 +153,15 @@ sub _changelog_parse { } } -sub changelog_parse { - my (%options) = @_; +=back - if (exists $options{forceplugin}) { - warnings::warnif('deprecated', 'obsolete forceplugin option'); - } +=head1 CHANGES - return _changelog_parse(%options); -} +=head2 Version 2.00 (dpkg 1.20.0) -=back +Remove functions: changelog_parse_debian(), changelog_parse_plugin(). -=head1 CHANGES +Remove warnings: For options 'forceplugin', 'libdir'. =head2 Version 1.03 (dpkg 1.19.0) |