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

[lintian] 03/03: Do not emit python-foo-but-no-python3-foo for -common packages.



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

lamby pushed a commit to branch master
in repository lintian.

commit 890f3a36541e51a99f9e11bbe7825427dc9bbce4
Author: Chris Lamb <lamby@debian.org>
Date:   Mon Oct 2 20:56:20 2017 +0100

    Do not emit python-foo-but-no-python3-foo for -common packages.
---
 checks/python.pm                                              |  2 +-
 debian/changelog                                              |  1 +
 .../python-python2-no-python3-unrel/debian/debian/control.in  | 11 +++++++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/checks/python.pm b/checks/python.pm
index 33890c6..1b446a3 100644
--- a/checks/python.pm
+++ b/checks/python.pm
@@ -47,7 +47,7 @@ sub _run_source {
     my @package_names = $info->binaries;
     foreach my $bin (@package_names) {
         # Python 2 modules
-        if ($bin =~ /^python2?-(.*(?<!-doc))$/) {
+        if ($bin =~ /^python2?-(.*(?<!-doc)(?<!-common))$/) {
             my $suffix = $1;
             tag 'python-foo-but-no-python3-foo', $bin
               unless any { $_ eq "python3-${suffix}" } @package_names;
diff --git a/debian/changelog b/debian/changelog
index 8fa4c01..c5c96b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ lintian (2.5.55) UNRELEASED; urgency=medium
     + [CL] Also match packages named "python2-*" as relating to Python 2.x.
     + [CL] Warn about Django libraries that do not depend on Django itself.
       (Closes: #877292)
+    + [CL] Do not emit python-foo-but-no-python3-foo for -common packages.
   * checks/scripts.desc:
     + [CL] Add missing example-script-uses-deprecated-nodejs-location tag.
       (Closes: #877142)
diff --git a/t/tests/python-python2-no-python3-unrel/debian/debian/control.in b/t/tests/python-python2-no-python3-unrel/debian/debian/control.in
index 13c8dec..ba0c045 100644
--- a/t/tests/python-python2-no-python3-unrel/debian/debian/control.in
+++ b/t/tests/python-python2-no-python3-unrel/debian/debian/control.in
@@ -36,3 +36,14 @@ Description: Python 2 package with corresponding Python 3 package (documentation
  be an empty package.
  .
  This package contains documentation.
+
+Package: python-{$source}-common
+Architecture: all
+Depends: $\{misc:Depends\}
+Description: Python 2 package with corresponding Python 3 package (common files)
+ 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.
+ .
+ This package contains files common to both packages.

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


Reply to: