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

[lintian] 02/04: checks/python.pm: Also match packages named "python2-*" as relating to Python 2.x.



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

lamby pushed a commit to branch master
in repository lintian.

commit de720e4a4c8a0aa8c1c92903c41a98f510704d24
Author: Chris Lamb <lamby@debian.org>
Date:   Sat Sep 30 09:35:28 2017 +0100

    checks/python.pm: Also match packages named "python2-*" as relating to Python 2.x.
---
 checks/python.pm | 4 ++--
 debian/changelog | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/checks/python.pm b/checks/python.pm
index bd17a9b..9db2a0e 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 =~ /^python-(.*(?<!-doc))$/) {
+        if ($bin =~ /^python2?-(.*(?<!-doc))$/) {
             my $suffix = $1;
             tag 'python-foo-but-no-python3-foo', $bin
               unless any { $_ eq "python3-${suffix}" } @package_names;
@@ -72,7 +72,7 @@ sub _run_binary {
     my @entries = $info->changelog ? $info->changelog->data : ();
 
     # Python 2 modules
-    if ($pkg =~ /^python-.*(?<!-doc)$/) {
+    if ($pkg =~ /^python2?-.*(?<!-doc)$/) {
         tag 'new-package-should-not-package-python2-module'
           if @entries == 1;
     }
diff --git a/debian/changelog b/debian/changelog
index 2c5ad99..8ae2601 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ lintian (2.5.55) UNRELEASED; urgency=medium
 
   * checks/python.pm:
     + [CL] Move to "Type: source, binary" check type.
+    + [CL] Also match packages named "python2-*" as relating to Python 2.x.
 
  -- Chris Lamb <lamby@debian.org>  Fri, 29 Sep 2017 19:13:19 +0100
 

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


Reply to: