[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#917967: lintian: drop versioned-dependency-satisfied-by-perl



Package: lintian
Version: 2.5.118
Tags: patch
X-Debbugs-Cc: debian-perl@lists.debian.org

Now that perl provides its dual-lived module packages with versions,
this check is unneeded.

In time, a new check could be added recommending that the complex
form previously recommended be dropped, but I suggest that be treated
separately.

Cheers,
Dominic.
>From a60d4fcc63adbfe541c151d9b5079df74dd0fbc9 Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <dom@earth.li>
Date: Tue, 1 Jan 2019 18:05:46 +0000
Subject: [PATCH] Remove versioned-dependency-satisfied-by-perl

perl now uses versioned provides, so the advice given here is
redundant.
---
 checks/fields.desc                               | 28 ------------------------
 checks/fields.pm                                 | 16 --------------
 t/tests/fields-depends-general/debian/control.in |  4 ++--
 t/tests/fields-depends-general/desc              |  1 -
 t/tests/fields-depends-general/tags              |  2 --
 5 files changed, 2 insertions(+), 49 deletions(-)

diff --git a/checks/fields.desc b/checks/fields.desc
index 4158e6506..9f3e862a0 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -967,34 +967,6 @@ Certainty: certain
 Info: The uploader appears more than once in the <tt>Uploaders</tt>
  field. The duplicate information should be removed.
 
-Tag: versioned-dependency-satisfied-by-perl
-Severity: normal
-Certainty: certain
-Info: This package declares an unnecessary versioned dependency
- on a package that is also provided by one of the Perl core packages
- (perl, perl-base, perl-modules) with at least the required version.
- .
- As versioned dependencies are not satisfied by provided packages,
- this unnecessarily pulls in a separately packaged newer version
- of the module.
- .
- The recommended way to express the dependency without needless
- complications on backporting packages is to use alternative dependencies.
- The perl package should be the preferred alternative and the
- versioned dependency a secondary one.
- .
- Example: perl (&gt;= 5.10.0) | libmodule-build-perl (&gt;= 0.26)
- .
- An exception to this is when the dependency is only satisfied in a
- version of perl in experimental. In this case, the dependency on perl
- should come second.
- .
- Example: libextutils-parsexs-perl (&gt;= 2.210000) | perl (&gt;= 5.14)
- .
- Running <tt>cme fix dpkg -from control -filter Depends</tt> should be able
- to update these dependencies.
-Ref: policy 7.5
-
 Tag: package-superseded-by-perl
 Severity: normal
 Certainty: certain
diff --git a/checks/fields.pm b/checks/fields.pm
index 37d885b96..274b685b1 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -906,14 +906,6 @@ sub run {
                       if ("$d_pkg-doc" eq $pkg
                         && $field =~ /^(?:pre-)?depends$/);
 
-                    # only trigger this for the preferred alternative
-                    tag 'versioned-dependency-satisfied-by-perl',
-                      "$field: $part_d_orig"
-                      if $alternatives[0][-1] eq $part_d_orig
-                      && &$is_dep_field($field)
-                      && perl_core_has_version($d_pkg, $d_version->[0],
-                        $d_version->[1]);
-
                     tag 'package-relation-with-perl-modules', "$field: $d_pkg"
                       # matches "perl-modules" (<= 5.20) as well as
                       # perl-modules-5.xx (>> 5.20)
@@ -1182,14 +1174,6 @@ sub run {
                           # perl-modules-5.xx (>> 5.20)
                           if $d_pkg =~ /^perl-modules/
                           && $proc->pkg_src ne 'perl';
-
-                        # only trigger this for the preferred alternative
-                        tag 'versioned-dependency-satisfied-by-perl',
-                          "$field: $part_d_orig"
-                          if $alternatives[0][-1] eq $part_d_orig
-                          && &$is_dep_field($field)
-                          && perl_core_has_version($d_pkg, $d_version->[0],
-                            $d_version->[1]);
                     }
 
                     my $all_obsolete = 0;
diff --git a/t/tests/fields-depends-general/debian/control.in b/t/tests/fields-depends-general/debian/control.in
index 4b6672bf2..abedf22b5 100644
--- a/t/tests/fields-depends-general/debian/control.in
+++ b/t/tests/fields-depends-general/debian/control.in
@@ -3,14 +3,14 @@ Priority: optional
 Section: {$section}
 Maintainer: {$author}
 Standards-Version: {$standards_version}
-Build-Depends: {$build_depends}, libtest-simple-perl (>= 0.98), perl-modules
+Build-Depends: {$build_depends}, perl-modules
 Rules-Requires-Root: no
 
 Package: {$source}
 Architecture: all
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, xorg, bash,
  conflict-dep, gawk | awk, new-package | xbase-clients (>= 0.1), {$source},
- gaim (>= 0.1), emacs21, emacs22, emacs23, makedev, libtest-simple-perl (>= 0.98),
+ gaim (>= 0.1), emacs21, emacs22, emacs23, makedev,
  packaging-dev, xfont-a, emacs22-gtk, emacs23-el, emacs23-nox, emacs23-lucid,
  emacs222, perl-modules, debhelper
 Breaks: package-without-version, {$source} (<< 0.1),
diff --git a/t/tests/fields-depends-general/desc b/t/tests/fields-depends-general/desc
index 47223aded..640dd76a8 100644
--- a/t/tests/fields-depends-general/desc
+++ b/t/tests/fields-depends-general/desc
@@ -22,4 +22,3 @@ Test-For:
  package-depends-on-itself
  package-relation-with-perl-modules
  package-relation-with-self
- versioned-dependency-satisfied-by-perl
diff --git a/t/tests/fields-depends-general/tags b/t/tests/fields-depends-general/tags
index a505d1bf7..3b1349079 100644
--- a/t/tests/fields-depends-general/tags
+++ b/t/tests/fields-depends-general/tags
@@ -12,7 +12,6 @@ E: py-fields-depends-general: depends-on-python-minimal depends
 I: fields-depends-general: conflicts-with-version package-with-version (<< 3.0)
 I: fields-depends-general: ored-depends-on-obsolete-package depends: xbase-clients (>= 0.1)
 W: fields-depends-general source: package-depends-on-itself fields-depends-general depends
-W: fields-depends-general source: versioned-dependency-satisfied-by-perl build-depends: libtest-simple-perl (>= 0.98)
 W: fields-depends-general-doc: doc-package-depends-on-main-package depends
 W: fields-depends-general: binary-package-depends-on-toolchain-package depends: debhelper
 W: fields-depends-general: breaks-without-version package-without-version
@@ -26,7 +25,6 @@ W: fields-depends-general: depends-on-old-emacs depends: emacs23-lucid
 W: fields-depends-general: depends-on-old-emacs depends: emacs23-nox
 W: fields-depends-general: depends-on-packaging-dev depends
 W: fields-depends-general: package-relation-with-self breaks: fields-depends-general (<< 0.1)
-W: fields-depends-general: versioned-dependency-satisfied-by-perl depends: libtest-simple-perl (>= 0.98)
 W: libfields-depends-general: binary-package-depends-on-toolchain-package recommends: cdbs
 W: libfields-depends-general: empty-binary-package
 W: libfields-depends-general: lib-recommends-documentation recommends: debconf-doc
-- 
2.11.0


Reply to: