summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2021-09-08 17:41:58 +0200
committergregor herrmann <gregoa@debian.org>2021-09-08 17:41:58 +0200
commit64b0987213814fcfab18b68e0eff3458697be21d (patch)
tree9d164c6484ddbb009c3ecb23ffae0499f1dd75ad
parentb57943dfeef868816578e822a812a6e678f1414c (diff)
Adjust to lintian 2.105.0.
Use the new /usr/share/lintian/private/latest-policy-version helper in StandardVersion.pm and dpkg-control-test-conf.pl instead of the now private Lintian:** perl modules. Cf. #968000 (Note: We are not closing this bug as this is probably an interim workaround until #968154 is fixed.)
-rw-r--r--lib/Config/Model/Dpkg/Control/Source/StandardVersion.pm17
-rw-r--r--t/model_tests.d/dpkg-control-test-conf.pl12
2 files changed, 8 insertions, 21 deletions
diff --git a/lib/Config/Model/Dpkg/Control/Source/StandardVersion.pm b/lib/Config/Model/Dpkg/Control/Source/StandardVersion.pm
index 8578104a..29739239 100644
--- a/lib/Config/Model/Dpkg/Control/Source/StandardVersion.pm
+++ b/lib/Config/Model/Dpkg/Control/Source/StandardVersion.pm
@@ -9,25 +9,16 @@ use Sort::Versions;
use feature qw/postderef signatures/;
no warnings qw/experimental::postderef experimental::signatures/;
-# Debian only module
-use Lintian::Data;
-use Lintian::Profile;
-
-# Given the initialisation required for Lintian::Data, using compute
-# to extract the default value from Lintain is scary: I'd rather avoid
-# running this code several times in an eval as done by compute
-my $profile = Lintian::Profile->new();
-$profile->load('debian');
-Lintian::Data->set_vendor($profile);
-my $standards = Lintian::Data->new('standards-version/release-dates', qr/\s+/);
-my @std_list = $standards->all();
+# lintian 2.105.0, #968000
+chomp( my $std_ver = qx| /usr/share/lintian/private/latest-policy-version | );
+$std_ver =~ s|^(\d+\.\d+\.\d+)\.\d+$|$1|;
sub _fetch_std {
goto &_fetch_std_no_check;
}
sub _fetch_std_no_check {
- return $std_list[0];
+ return $std_ver;
}
sub compare_with_last_version ($self, $to_check) {
diff --git a/t/model_tests.d/dpkg-control-test-conf.pl b/t/model_tests.d/dpkg-control-test-conf.pl
index 9f873722..d2539a7a 100644
--- a/t/model_tests.d/dpkg-control-test-conf.pl
+++ b/t/model_tests.d/dpkg-control-test-conf.pl
@@ -1,7 +1,5 @@
use Data::Dumper;
use Path::Tiny;
-use Lintian::Data;
-use Lintian::Profile;
use Config::Model::Dpkg::Dependency;
use strict;
@@ -10,11 +8,9 @@ use warnings;
my $conf_file_name = "control";
my $conf_dir = 'debian';
-my $profile = Lintian::Profile->new ();
-$profile->load('debian');
-Lintian::Data->set_vendor($profile);
-my $standards = Lintian::Data->new('standards-version/release-dates', qr/\s+/);
-my @std_list = $standards->all();
+# lintian 2.105.0, #968000
+chomp( my $std_ver = qx| /usr/share/lintian/private/latest-policy-version | );
+$std_ver =~ s|^(\d+\.\d+\.\d+)\.\d+$|$1|;
my $t3_description = "This is an extension of Dist::Zilla::Plugin::InlineFiles,
providing the following file:
@@ -55,7 +51,7 @@ my @tests = (
# t0
check => {
'source Source', "libdist-zilla-plugins-cjm-perl",
- 'source Standards-Version' => $std_list[0],
+ 'source Standards-Version' => $std_ver,
'source Build-Depends:0', "debhelper (>= 7)",
'source Build-Depends-Indep:0', "libcpan-meta-perl", # fixed
'source Build-Depends-Indep:1', "libdist-zilla-perl", # fixed