summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2019-11-16 00:30:04 +0100
committerGuillem Jover <guillem@debian.org>2019-11-26 02:42:44 +0100
commit7a68fdc76ea3a009ace005aa7972bb337995b127 (patch)
treed48bf352366c1bad92318eeb0cdc9481da172e16
parentab8176cb9a92a39d062da002cf9192bdc6e5f3d1 (diff)
downloaddpkg-7a68fdc76ea3a009ace005aa7972bb337995b127.tar.gz
Dpkg::Deps::KnownFacts: Remove obsolete check_package() method
Bump module version to 2.00.
-rw-r--r--debian/changelog1
-rw-r--r--scripts/Dpkg/Deps/KnownFacts.pm37
2 files changed, 6 insertions, 32 deletions
diff --git a/debian/changelog b/debian/changelog
index 28373d1c6..bef7ecc95 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
- Dpkg::Compression: Hide internal lowercase variables
$default_compression, $default_compression_level and
$compression_re_file_ext.
+ - Dpkg::Deps::KnownFacts: Remove obsolete check_package() method.
* Documentation:
- man: Fix uncommon wording constructs.
- man: Use a minus sign for a literal string.
diff --git a/scripts/Dpkg/Deps/KnownFacts.pm b/scripts/Dpkg/Deps/KnownFacts.pm
index 192f6aa6b..a414eb49b 100644
--- a/scripts/Dpkg/Deps/KnownFacts.pm
+++ b/scripts/Dpkg/Deps/KnownFacts.pm
@@ -37,7 +37,7 @@ packages provided (by the set of installed packages).
use strict;
use warnings;
-our $VERSION = '1.01';
+our $VERSION = '2.00';
use Dpkg::Version;
@@ -109,37 +109,6 @@ sub add_provided_package {
push @{$self->{virtualpkg}{$pkg}}, $v;
}
-=item ($check, $param) = $facts->check_package($package)
-
-$check is one when the package is found. For a real package, $param
-contains the version. For a virtual package, $param contains an array
-reference containing the list of packages that provide it (each package is
-listed as [ $provider, $relation, $version ]).
-
-This function is obsolete and should not be used. Dpkg::Deps::KnownFacts
-is only meant to be filled with data and then passed to Dpkg::Deps
-methods where appropriate, but it should not be directly queried.
-
-=cut
-
-sub check_package {
- my ($self, $pkg) = @_;
-
- warnings::warnif('deprecated', 'obsolete function, pass ' .
- 'Dpkg::Deps::KnownFacts to Dpkg::Deps methods instead');
-
- if (exists $self->{pkg}{$pkg}) {
- return (1, $self->{pkg}{$pkg}[0]{version});
- }
- if (exists $self->{virtualpkg}{$pkg}) {
- my $arrayref = [ map { [
- $_->{provider}, $_->{relation}, $_->{version}
- ] } @{$self->{virtualpkg}{$pkg}} ];
- return (1, $arrayref);
- }
- return (0, undef);
-}
-
##
## The functions below are private to Dpkg::Deps::KnownFacts.
##
@@ -228,6 +197,10 @@ sub evaluate_simple_dep {
=head1 CHANGES
+=head2 Version 2.00 (dpkg 1.20.0)
+
+Remove method: $facts->check_package().
+
=head2 Version 1.01 (dpkg 1.16.1)
New option: Dpkg::Deps::KnownFacts->add_installed_package() now accepts 2