This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit c1b795cdb344e8bec9ab8122ec0da0cf6ccba392 Author: Chris Lamb <la...@debian.org> Date: Tue Jan 9 14:21:36 2018 +0530 When checking for a Python 3 variant of a Python 2.x package also consider any package that declares a binary dependency on the ${python3:Depends} substvar to catch packages that have been renamed. Thanks to Scott Kitterman for the report. (Closes: #886303) --- checks/python.desc | 12 +++++++---- checks/python.pm | 6 ++++++ debian/changelog | 4 ++++ .../debian/debian/control.in | 23 ++++++++++++++++++++++ t/tests/python-python2-no-python3-unrel/desc | 1 + t/tests/python-python2-no-python3-unrel/tags | 1 + 6 files changed, 43 insertions(+), 4 deletions(-) diff --git a/checks/python.desc b/checks/python.desc index bde9f5a..b95ad64 100644 --- a/checks/python.desc +++ b/checks/python.desc @@ -26,14 +26,18 @@ Info: This package appears to be the initial packaging of a new upstream Tag: python-foo-but-no-python3-foo Severity: normal Certainty: certain -Info: This package appears to generate a Python 2 module without a - corresponding Python 3 version. +Info: This source package appears to generate the specified Python 2 package + without creating a variant for Python 3. . The 2.x series of Python is due for deprecation and will not be maintained past 2020. . - If upstream have not moved or have no intention to move to Python 3, please be - certain that Debian would benefit from the inclusion of this package. + If upstream have not moved or have no intention to move to Python 3, please + be certain that Debian would benefit from the continued inclusion of this + package and, if not, consider removing it. + . + Alternatively, ensure that the corresponding package specifies the + <tt>${python3:Depends}</tt> substvar in its binary depedencies. Tag: build-depends-on-python-sphinx-only Severity: normal diff --git a/checks/python.pm b/checks/python.pm index a21bc35..85f3511 100644 --- a/checks/python.pm +++ b/checks/python.pm @@ -63,6 +63,12 @@ sub _run_source { my $suffix = $1; next if any { $bin =~ /$_/ } @IGNORE; next if any { $_ eq "python3-${suffix}" } @package_names; + # Don't trigger if we ship any Python 3 module + next if any { + $info->binary_relation($_, 'all') + ->implies('${python3:Depends}') + } + @package_names; tag 'python-foo-but-no-python3-foo', $bin; } } diff --git a/debian/changelog b/debian/changelog index 3a62177..25f76e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,10 @@ lintian (2.5.68) UNRELEASED; urgency=medium "dependency-on-python-version-marked-for-end-of-life" tag from normal ("W:") to wishlist ("I:") as it is not necessarily actionable by the maintainer. This reverts bug #883581. (Closes: #886259) + + [CL] When checking for a Python 3 variant of a Python 2.x package + also consider any package that declares a binary dependency on the + ${python3:Depends} substvar to catch packages that have been renamed. + Thanks to Scott Kitterman for the report. (Closes: #886303) * checks/rules.pm: + [CL] Also allow $(overridden_command) when checking for the override_dh_fixperms-does-not-call-dh_fixperms etc. tags. diff --git a/t/tests/python-python2-no-python3-unrel/debian/debian/control.in b/t/tests/python-python2-no-python3-unrel/debian/debian/control.in index c467f05..269aebd 100644 --- a/t/tests/python-python2-no-python3-unrel/debian/debian/control.in +++ b/t/tests/python-python2-no-python3-unrel/debian/debian/control.in @@ -59,3 +59,26 @@ Description: Python 2 package with corresponding Python 3 package (tools) be an empty package. . This package contains tools. + +Package: python-{$source}-2 +Architecture: all +Depends: $\{misc:Depends\} +Description: Python 2 package with corresponding Python 3 package (2) + 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. + . + This package is another module. + +Package: entirely-unrelated-name +Architecture: all +Depends: $\{misc:Depends\}, $\{python3:Depends\} +Description: Python 3 version of python-{$source}-2 + 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. + . + This package is the Python 3 variant of the previous package but with a + different name. diff --git a/t/tests/python-python2-no-python3-unrel/desc b/t/tests/python-python2-no-python3-unrel/desc index fd36ee5..5dda6bb 100644 --- a/t/tests/python-python2-no-python3-unrel/desc +++ b/t/tests/python-python2-no-python3-unrel/desc @@ -4,3 +4,4 @@ Version: 1.0 Description: Check for Python packages that only ship a Python 2.x module Test-Against: python-foo-but-no-python3-foo + python3-depends-but-no-python3-helper diff --git a/t/tests/python-python2-no-python3-unrel/tags b/t/tests/python-python2-no-python3-unrel/tags index e69de29..7925eb8 100644 --- a/t/tests/python-python2-no-python3-unrel/tags +++ b/t/tests/python-python2-no-python3-unrel/tags @@ -0,0 +1 @@ +E: python-python2-no-python3-unrel source: python3-depends-but-no-python3-helper entirely-unrelated-name -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git