This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit 4ce907fb43a60eb6b8ddd9b31b906e9ed4f9605b Author: Chris Lamb <[email protected]> Date: Fri Aug 4 11:07:25 2017 -0400 Check for packages that Build-Depend on python-sphinx only. (Closes: #870730) --- checks/python.desc | 13 +++++++++++ checks/python.pm | 5 +++++ debian/changelog | 2 ++ .../debian/debian/control.in | 26 ++++++++++++++++++++++ t/tests/python-build-depends-on-sphinx-unrel/desc | 5 +++++ t/tests/python-build-depends-on-sphinx-unrel/tags | 0 .../debian/debian/control.in | 26 ++++++++++++++++++++++ t/tests/python-build-depends-on-sphinx/desc | 5 +++++ t/tests/python-build-depends-on-sphinx/tags | 1 + t/tests/python-python2/debian/debian/control.in | 2 +- 10 files changed, 84 insertions(+), 1 deletion(-) diff --git a/checks/python.desc b/checks/python.desc index 1d9c83d..0d6da56 100644 --- a/checks/python.desc +++ b/checks/python.desc @@ -26,3 +26,16 @@ Info: This package appears to generate a Python 2 module without a . The 2.x series of Python is due for deprecation and will not be maintained past 2020. + +Tag: build-depends-on-python-sphinx-only +Severity: normal +Certainty: certain +Info: This package Build-Depends on the Python 2.x version of the Sphinx + documentation generator. + . + The 2.x series of Python is due for deprecation and will not be maintained + past 2020. + . + Some Python modules may need to depend on both <tt>python-sphinx</tt> and + <tt>python3-sphinx</tt> but please consider moving to only Build-Depending on + the <tt>python3-sphinx</tt> package instead. diff --git a/checks/python.pm b/checks/python.pm index ba2c567..3e8bab3 100644 --- a/checks/python.pm +++ b/checks/python.pm @@ -46,6 +46,11 @@ sub run { } } + my $build_all = $info->relation('build-depends-all'); + tag 'build-depends-on-python-sphinx-only' + if $build_all->implies('python-sphinx') + and !$build_all->implies('python3-sphinx'); + return; } diff --git a/debian/changelog b/debian/changelog index 9c7af75..e3d5642 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,8 @@ lintian (2.5.53) UNRELEASED; urgency=medium check of type "source". + [CL] Check for python-foo without corresponding python3-foo packages to assist in Python 2.x deprecation. (Closes: #870681) + + [CL] Check for packages that Build-Depend on python-sphinx only. + (Closes: #870730) * checks/scripts.pm: + [CL] Correct false positives in unconditional-use-of-dpkg-statoverride by detecting "if !" as a diff --git a/t/tests/python-build-depends-on-sphinx-unrel/debian/debian/control.in b/t/tests/python-build-depends-on-sphinx-unrel/debian/debian/control.in new file mode 100644 index 0000000..973f208 --- /dev/null +++ b/t/tests/python-build-depends-on-sphinx-unrel/debian/debian/control.in @@ -0,0 +1,26 @@ +Source: {$source} +Priority: extra +Section: python +Maintainer: {$author} +Standards-Version: {$standards_version} +Build-Depends: debhelper (>= 9), python-sphinx, python3-sphinx + +Package: python-{$source} +Architecture: all +Depends: $\{misc:Depends\}, python2.7 +Description: Test package + 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. + +Package: python3-{$source} +Architecture: all +Depends: $\{misc:Depends\}, python3 +Description: Test package (Python 3) + 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. + . + Python 3 variant. diff --git a/t/tests/python-build-depends-on-sphinx-unrel/desc b/t/tests/python-build-depends-on-sphinx-unrel/desc new file mode 100644 index 0000000..5d88e88 --- /dev/null +++ b/t/tests/python-build-depends-on-sphinx-unrel/desc @@ -0,0 +1,5 @@ +Testname: python-build-depends-on-sphinx-unrel +Version: 1.0 +Description: Check packages that Build-Depend on python-sphinx +Test-Against: + build-depends-on-python-sphinx-only diff --git a/t/tests/python-build-depends-on-sphinx-unrel/tags b/t/tests/python-build-depends-on-sphinx-unrel/tags new file mode 100644 index 0000000..e69de29 diff --git a/t/tests/python-build-depends-on-sphinx/debian/debian/control.in b/t/tests/python-build-depends-on-sphinx/debian/debian/control.in new file mode 100644 index 0000000..4cf4086 --- /dev/null +++ b/t/tests/python-build-depends-on-sphinx/debian/debian/control.in @@ -0,0 +1,26 @@ +Source: {$source} +Priority: extra +Section: python +Maintainer: {$author} +Standards-Version: {$standards_version} +Build-Depends: debhelper (>= 9), python-sphinx + +Package: python-{$source} +Architecture: all +Depends: $\{misc:Depends\}, python2.7 +Description: Test package + 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. + +Package: python3-{$source} +Architecture: all +Depends: $\{misc:Depends\}, python3 +Description: Test package (Python 3) + 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. + . + Python 3 variant. diff --git a/t/tests/python-build-depends-on-sphinx/desc b/t/tests/python-build-depends-on-sphinx/desc new file mode 100644 index 0000000..3de76d0 --- /dev/null +++ b/t/tests/python-build-depends-on-sphinx/desc @@ -0,0 +1,5 @@ +Testname: python-build-depends-on-sphinx +Version: 1.0 +Description: Check packages that Build-Depend on python-sphinx +Test-For: + build-depends-on-python-sphinx-only diff --git a/t/tests/python-build-depends-on-sphinx/tags b/t/tests/python-build-depends-on-sphinx/tags new file mode 100644 index 0000000..a3389af --- /dev/null +++ b/t/tests/python-build-depends-on-sphinx/tags @@ -0,0 +1 @@ +W: python-build-depends-on-sphinx source: build-depends-on-python-sphinx-only diff --git a/t/tests/python-python2/debian/debian/control.in b/t/tests/python-python2/debian/debian/control.in index acf55c7..685219e 100644 --- a/t/tests/python-python2/debian/debian/control.in +++ b/t/tests/python-python2/debian/debian/control.in @@ -3,7 +3,7 @@ Priority: extra Section: python Maintainer: {$author} Standards-Version: {$standards_version} -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper (>= 9), python-sphinx Package: python-{$source}-nopy3 Architecture: all -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

