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

[lintian] 01/01: c/fields.*: Also emit package-relation-with-perl-module for build-* relations



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

abe pushed a commit to branch master
in repository lintian.

commit 49397cba96bd1352c527af2e9441025ce91caab8
Author: Axel Beckert <abe@deuxchevaux.org>
Date:   Tue Sep 8 20:18:59 2015 +0200

    c/fields.*: Also emit package-relation-with-perl-module for build-* relations
    
    Thanks gregor herrmann!
    
    Closes: #798385
---
 checks/fields.desc                                      | 7 ++++---
 checks/fields.pm                                        | 7 +++++++
 debian/changelog                                        | 2 ++
 t/tests/fields-depends-general/debian/debian/control.in | 2 +-
 t/tests/fields-depends-general/tags                     | 1 +
 5 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/checks/fields.desc b/checks/fields.desc
index e9b2667..acea0df 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1268,6 +1268,7 @@ Tag: package-relation-with-perl-modules
 Severity: important
 Certainty: certain
 Experimental: yes
-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.
+Info: No package should (build-) 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 a555d55..1829c15 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -1068,6 +1068,13 @@ sub run {
                           if ($d_version->[0]
                             && !version_check($d_version->[1]));
 
+                        tag 'package-relation-with-perl-modules',
+                          "$field: $part_d_orig"
+                          # matches "perl-modules" (<= 5.20) as well as
+                          # perl-modules-5.xx (>> 5.20)
+                          if $d_pkg =~ /^perl-modules/
+                          && $proc->pkg_src ne 'perl';
+
                         # only trigger this for the the preferred alternative
                         tag 'versioned-dependency-satisfied-by-perl',
                           "$field: $part_d_orig"
diff --git a/debian/changelog b/debian/changelog
index f534e02..2f552f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,8 @@ lintian (2.5.37) UNRELEASED; urgency=medium
     + [JW] Use "an" (instead of "a") before "HTTP".
     + [NT] Assert that -dbgsym packages are in the "debug" section.
       Thanks to Jean-Michel Vourgère for reporting the issue.
+    + [AB] Also emit package-relation-with-perl-module for build-*
+      relations. Thanks gregor herrmann! (Closes: #798385)
   * checks/obsolete-sites.{desc,pm}:
     + [AB] New check with tag obsolete-url-in-packaging to check for URLs
       of hosting sites with frozen contents or (soon to be) closed hosting
diff --git a/t/tests/fields-depends-general/debian/debian/control.in b/t/tests/fields-depends-general/debian/debian/control.in
index 870f98a..d463f47 100644
--- a/t/tests/fields-depends-general/debian/debian/control.in
+++ b/t/tests/fields-depends-general/debian/debian/control.in
@@ -3,7 +3,7 @@ Priority: extra
 Section: {$section}
 Maintainer: {$author}
 Standards-Version: {$standards_version}
-Build-Depends: debhelper (>= 9), libencode-perl (>= 2.4)
+Build-Depends: debhelper (>= 9), libencode-perl (>= 2.4), perl-modules
 
 Package: {$source}
 Architecture: {$architecture}
diff --git a/t/tests/fields-depends-general/tags b/t/tests/fields-depends-general/tags
index 87bc089..285c08f 100644
--- a/t/tests/fields-depends-general/tags
+++ b/t/tests/fields-depends-general/tags
@@ -24,5 +24,6 @@ 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: lib-recommends-documentation recommends: debconf-doc
+X: fields-depends-general source: package-relation-with-perl-modules build-depends: perl-modules
 X: fields-depends-general: package-relation-with-perl-modules depends: perl-modules
 X: libfields-depends-general: package-relation-with-perl-modules depends: perl-modules-5.22

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


Reply to: