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

lamby pushed a commit to branch master
in repository lintian.

commit 5e04193b2a92640c5e41616625df62103381938f
Author: Chris Lamb <la...@debian.org>
Date:   Mon Dec 11 22:22:45 2017 +0000

    Also check for packages installing modules called "site" or "docs" into the 
global namespace. (Closes: #769365)
---
 checks/files.pm                                                        | 2 +-
 debian/changelog                                                       | 3 +++
 .../files-python-module-has-overly-generic-name/debian/debian/install  | 3 +++
 t/tests/files-python-module-has-overly-generic-name/debian/site.py     | 0
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/checks/files.pm b/checks/files.pm
index 98f4afb..50701f4 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -1412,7 +1412,7 @@ sub run {
             }
             tag 'python-module-in-wrong-location', @correction
               if (@correction);
-            if (    $rest =~ m,^(tests?)(?:\.py|/__init__\.py)$,
+            if (    $rest =~ m,^(docs?|site|tests?)s?(?:\.py|/__init__\.py)$,
                 and $file->is_regular_file) {
                 tag 'python-module-has-overly-generic-name', $fname, "($1)";
             }
diff --git a/debian/changelog b/debian/changelog
index c672698..c6dd6e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ lintian (2.5.63) UNRELEASED; urgency=medium
       report.  (Closes: #882684)
     + [CL] Raise the certainty of multiarch-foreign-shared-library from
       "wild guess" to "possible" on the suggestion of Helmut Grohne.
+  * checks/python.pm:
+    + [CL] Also check for packages installing modules called "site" or
+      "docs" into the global namespace.  (Closes: #769365)
   * checks/scripts.desc:
     + [CL] Update description of python-script-but-no-python-dep to refer
       to pybuild.  (Closes: #660718)
diff --git 
a/t/tests/files-python-module-has-overly-generic-name/debian/debian/install 
b/t/tests/files-python-module-has-overly-generic-name/debian/debian/install
index 3e47d77..221b48f 100644
--- a/t/tests/files-python-module-has-overly-generic-name/debian/debian/install
+++ b/t/tests/files-python-module-has-overly-generic-name/debian/debian/install
@@ -1,4 +1,7 @@
+site.py /usr/lib/python3/dist-packages
 tests.py /usr/lib/python3/dist-packages
+__init__.py /usr/lib/python3/dist-packages/doc/
+__init__.py /usr/lib/python3/dist-packages/docs/
 __init__.py /usr/lib/python3/dist-packages/test/
 __init__.py /usr/lib/python3/dist-packages/tests/
 __init__.py /usr/lib/python3/dist-packages/false_positive/
diff --git a/t/tests/files-python-module-has-overly-generic-name/debian/site.py 
b/t/tests/files-python-module-has-overly-generic-name/debian/site.py
new file mode 100644
index 0000000..e69de29

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

Reply via email to