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

[lintian] 01/01: Prevent false positives when checking for Python {2, 3} packages that depend on Python {3, 2} packages when the package being depended on ends with -doc. We were previously only catching the case for dependencies *from* packages with such names. (Closes: #885693)



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

lamby pushed a commit to branch master
in repository lintian.

commit 8541914b64238be253f78b8364891f53225f51ba
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Dec 29 09:17:18 2017 +0000

    Prevent false positives when checking for Python {2,3} packages that depend on Python {3,2} packages when the package being depended on ends with -doc. We were previously only catching the case for dependencies *from* packages with such names. (Closes: #885693)
---
 checks/python.pm                                                     | 2 ++
 debian/changelog                                                     | 5 +++++
 .../debian/debian/control.in                                         | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/checks/python.pm b/checks/python.pm
index 6e26fa0..9de771b 100644
--- a/checks/python.pm
+++ b/checks/python.pm
@@ -120,6 +120,8 @@ sub _run_binary {
         for my $field (@FIELDS) {
             for my $prefix (@prefixes) {
                 my $visit = sub {
+                    # Depending on python-module-doc is always fine
+                    return if m/-doc$/;
                     #<<< No tidy (tag name too long)
                     tag 'python-package-depends-on-package-from-other-python-variant',
                         "($field: $_)" if m/^$prefix-/;
diff --git a/debian/changelog b/debian/changelog
index fbde290..608718a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,11 @@ lintian (2.5.67) UNRELEASED; urgency=medium
   * checks/files.pm:
     + [CL] Split out python-module-has-overly-generic-name regular
       expression into a data file.
+  * checks/python.pm:
+    + [CL] Prevent false positives when checking for Python {2,3} packages
+      that depend on Python {3,2} packages when the package being depended
+      on ends with -doc. We were previously only catching the case for
+      dependencies *from* packages with such names.  (Closes: #885693)
   * checks/watch-file.{desc,pm}:
     + [CL] Apply patch from Felix Lechner <felix.lechner@lease-up.com> to
       check for packages where an upstream signature exists but is not
diff --git a/t/tests/python-package-depends-on-package-from-other-python-variant/debian/debian/control.in b/t/tests/python-package-depends-on-package-from-other-python-variant/debian/debian/control.in
index 97f05dd..5df6ff1 100644
--- a/t/tests/python-package-depends-on-package-from-other-python-variant/debian/debian/control.in
+++ b/t/tests/python-package-depends-on-package-from-other-python-variant/debian/debian/control.in
@@ -28,7 +28,7 @@ Description: Python 2 package depending on python3-foo (explicit)
 
 Package: python3-foo
 Architecture: all
-Depends: $\{misc:Depends\}, python3, python-foo, python2-foo, python2-bar, python3-falsepositive
+Depends: $\{misc:Depends\}, python3, python-foo, python2-foo, python2-bar, python3-falsepositive, python-foo-doc
 Description: Python 3 package depending on python-foo and python2-foo
  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

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


Reply to: