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

Bug#644379: [checks/files] false-positive package-installs-python-bytecode



Package: lintian
Version: 2.5.3
Severity: normal
Tags: patch

$ lintian -F jython_2.5.1-2_all.deb E: jython: package-installs-python-bytecode usr/share/jython/Lib/test/pbcvm/test/test_builtin_pyc.pyc
E: jython: package-installs-python-bytecode usr/share/jython/Lib/test/pbcvm/test/test_exceptions_pyc.pyc
E: jython: package-installs-python-bytecode usr/share/jython/Lib/test/pbcvm/test/test_types_pyc.pyc

I consider these false-positives, because the files are for testing purposes only. (Since the tag causes fatal auto-reject, it's quite important to avoid false-positives...) I propose to exclude all test_*_pyc.py[co] files from the check.

--
Jakub Wilk
diff --git a/checks/files b/checks/files
--- a/checks/files
+++ b/checks/files
@@ -767,7 +767,8 @@
     #  skip any file installed inside a __pycache__ directory
     #  - we have a separate check for that directory.
     if ($file =~ m,\.py[co]$,o && $file !~ m,/__pycache__/,o) {
-        tag 'package-installs-python-bytecode', $file;
+        tag 'package-installs-python-bytecode', $file
+            unless $file =~ m,/test_[^/]+_pyc\.py[co]$,o;
     }
 
     # ---------------- __pycache__ (directory for pyc/pyo files)

Reply to: