[lintian] 01/01: Add new-package-should-not-package-python2-module tag
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch new-package-packages-python2-module
in repository lintian.
commit 51a7a2a34804af18c1a103f87c2a482372200e1b
Author: Chris Lamb <lamby@debian.org>
Date: Tue Jul 5 20:14:00 2016 +0200
Add new-package-should-not-package-python2-module tag
The 2.x series of Python is due for deprecation and will not be maintained
past 2020 so it is recommended that Python 2 modules are not packaged
unless necessary.
Signed-off-by: Chris Lamb <lamby@debian.org>
---
checks/scripts.desc | 13 +++++++++++++
checks/scripts.pm | 7 +++++++
t/tests/scripts-python2/debian/debian/control.in | 15 +++++++++++++++
t/tests/scripts-python2/desc | 8 ++++++++
t/tests/scripts-python2/tags | 1 +
5 files changed, 44 insertions(+)
diff --git a/checks/scripts.desc b/checks/scripts.desc
index 12a642b..87a0c29 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -752,3 +752,16 @@ Severity: classification
Certainty: possible
Info: The maintainer scripts of the package one or more auto-generated
shell snippets inserted by the listed debhelper tool.
+
+Tag: new-package-should-not-package-python2-module
+Severity: wishlist
+Certainty: certain
+Info: This package appears to be the first packaging of a new upstream
+ software package but it appears to package a module for Python 2.
+ .
+ The 2.x series of Python is due for deprecation and will not be maintained
+ past 2020 so it is recommended that Python 2 modules are not packaged unless
+ necessary.
+ .
+ This warning can be ignored if the package is not intended for Debian or
+ if it is a split of an existing Debian package.
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 5959e95..de4fcd7 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -1103,6 +1103,13 @@ sub run {
}
}
+ my @entries = $info->changelog->data;
+
+ if (@entries == 1) {
+ tag 'new-package-should-not-package-python2-module', $pkg
+ if $pkg =~ /^python-/
+ }
+
return;
}
diff --git a/t/tests/scripts-python2/debian/debian/control.in b/t/tests/scripts-python2/debian/debian/control.in
new file mode 100644
index 0000000..993dee7
--- /dev/null
+++ b/t/tests/scripts-python2/debian/debian/control.in
@@ -0,0 +1,15 @@
+Source: {$source}
+Priority: extra
+Section: python
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: debhelper (>= 9)
+
+Package: python-{$source}
+Architecture: all
+Depends: $\{misc:Depends\}, python2.7
+Description: {$description}
+ 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.
diff --git a/t/tests/scripts-python2/desc b/t/tests/scripts-python2/desc
new file mode 100644
index 0000000..56dba16
--- /dev/null
+++ b/t/tests/scripts-python2/desc
@@ -0,0 +1,8 @@
+Testname: scripts-python2
+Sequence: 6000
+Version: 1.0
+Description: Check various Python 2 issues
+Skeleton: pedantic
+Options: --pedantic -I -E
+Test-For:
+ new-package-should-not-package-python2-module
diff --git a/t/tests/scripts-python2/tags b/t/tests/scripts-python2/tags
new file mode 100644
index 0000000..685f534
--- /dev/null
+++ b/t/tests/scripts-python2/tags
@@ -0,0 +1 @@
+I: python-scripts-python2: new-package-should-not-package-python2-module python-scripts-python2
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: