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

[lintian] 01/01: c/fields.pm: Add depends-on-perl-modules tag from pkg-perl-tools



This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch ppt-lc-mover
in repository lintian.

commit b8469c678d8148a5cec3c1266d6c444f5db360bf
Author: Axel Beckert <abe@deuxchevaux.org>
Date:   Thu Aug 13 18:44:02 2015 +0200

    c/fields.pm: Add depends-on-perl-modules tag from pkg-perl-tools
    
    Original code by Damyan Ivanov.
    
    The included check has been extended  to also recognize future
    versionedperl-modules-5.* package names.
    
    Signed-off-by: Axel Beckert <abe@deuxchevaux.org>
---
 checks/fields.desc                                     |  7 +++++++
 checks/fields.pm                                       |  3 +++
 debian/changelog                                       |  3 +++
 .../fields-depends-general/debian/debian/control.in    | 18 ++++++++++++++++--
 t/tests/fields-depends-general/tags                    |  2 ++
 5 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/checks/fields.desc b/checks/fields.desc
index 58300e0..c52b285 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1258,3 +1258,10 @@ Severity: serious
 Certainty: certain
 Info: libmodule-build-tiny-perl needs to be in <tt>Build-Depends</tt>, not
  in Build-Depends-Indep, since it's used in the clean target.
+
+Tag: depends-on-perl-modules
+Severity: important
+Certainty: certain
+Info: No package should depend on 'perl-modules'. Instead, a suitable
+ dependency on 'perl' should be used. The existence of the perl-modules
+ package is an implementation detail of the perl packaging.
diff --git a/checks/fields.pm b/checks/fields.pm
index 23d7cbc..65f3f27 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -829,6 +829,9 @@ sub run {
                       && perl_core_has_version($d_pkg, $d_version->[0],
                         $d_version->[1]);
 
+                    tag 'depends-on-perl-modules', $field
+                      if $d_pkg =~ /^perl-modules/ && $pkg ne 'perl';
+
                     tag 'depends-exclusively-on-makedev', $field,
                       if ( $field eq 'depends'
                         && $d_pkg eq 'makedev'
diff --git a/debian/changelog b/debian/changelog
index bd85e7b..7f406b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,9 @@ lintian (2.5.36) UNRELEASED; urgency=medium
       dummy package to check for depends-on-old-emacs false positives.
     + [AB] Add libmodule-build(-tiny)-perl-needs-to-be-in-build-depends
       tags from pkg-perl-tools by gregor herrmann.
+    + [AB] Add depends-on-perl-modules tag from pkg-perl-tools by Damyan
+      Ivanov. Extend check to also recognize future versioned
+      perl-modules-5.* package names.
   * checks/files.desc:
     + [BR] Correct a few typos.  (Closes: #794953)
     + [BR] Rename files-privacybreach-may-use-debian-package
diff --git a/t/tests/fields-depends-general/debian/debian/control.in b/t/tests/fields-depends-general/debian/debian/control.in
index 4eaf1c6..ab82479 100644
--- a/t/tests/fields-depends-general/debian/debian/control.in
+++ b/t/tests/fields-depends-general/debian/debian/control.in
@@ -11,7 +11,7 @@ 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),
  packaging-dev, xfont-a, emacs22-gtk, emacs23-el, emacs23-nox, emacs23-lucid,
- emacs222
+ emacs222, perl-modules
 Breaks: package-without-version, {$source} (<< 0.1),
  replaced-wo-version
 Replaces: replaced-wo-version
@@ -23,7 +23,7 @@ Description: {$description}
 
 Package: lib{$source}
 Architecture: {$architecture}
-Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, libdb1-compat
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, libdb1-compat, perl-modules-5.22
 Recommends: debconf-doc
 Section: libs
 Description: {$description} -- fake library
@@ -54,3 +54,17 @@ Description: {$description} - Fake Doc package
  be an empty package.
  .
  The fake doc package.
+
+Package: perl
+Section: perl
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, perl-modules
+Description: {$description} - Fake Perl package
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
+ .
+ The fake Perl package which is only there to make sure
+ depends-on-perl-modules does not issue a false positive for the
+ dependency to perl-modules by perl.
diff --git a/t/tests/fields-depends-general/tags b/t/tests/fields-depends-general/tags
index 2f2c0d8..a36c187 100644
--- a/t/tests/fields-depends-general/tags
+++ b/t/tests/fields-depends-general/tags
@@ -2,9 +2,11 @@ E: fields-depends-general: conflicts-with-dependency depends conflict-dep
 E: fields-depends-general: depends-on-essential-package-without-using-version depends: bash
 E: fields-depends-general: depends-on-metapackage depends: xorg
 E: fields-depends-general: depends-on-obsolete-package depends: gaim (>= 0.1)
+E: fields-depends-general: depends-on-perl-modules depends
 E: fields-depends-general: needlessly-depends-on-awk depends
 E: fields-depends-general: package-depends-on-an-x-font-package depends: xfont-a
 E: libfields-depends-general: depends-on-libdb1-compat depends
+E: libfields-depends-general: depends-on-perl-modules depends
 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)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: