This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit f7d03c1faab43a448b9301e06231c8e419803bda Author: Chris Lamb <[email protected]> Date: Fri Dec 29 10:25:51 2017 +0000 Also ignore -common and -tools packages for intra-Python variant dependency checking, python-foo-but-no-python3-foo, etc. --- checks/python.pm | 7 ++++--- debian/changelog | 4 ++-- .../debian/debian/control.in | 12 ++++++++++++ t/tests/python-mismatched-python-substvar/tags | 2 +- .../python-python2-no-python3-unrel/debian/debian/control.in | 11 +++++++++++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/checks/python.pm b/checks/python.pm index 0c7ac6e..3df0f9d 100644 --- a/checks/python.pm +++ b/checks/python.pm @@ -54,7 +54,7 @@ sub _run_source { my @package_names = $info->binaries; foreach my $bin (@package_names) { # Python 2 modules - if ($bin =~ /^python2?-(.*(?<!-doc)(?<!-common))$/) { + if ($bin =~ /^python2?-(.*(?<!-doc)(?<!-common)(?<!-tools))$/) { my $suffix = $1; tag 'python-foo-but-no-python3-foo', $bin unless any { $_ eq "python3-${suffix}" } @package_names; @@ -74,6 +74,7 @@ sub _run_source { foreach my $regex (keys %MISMATCHED_SUBSTVARS) { my $substvar = $MISMATCHED_SUBSTVARS{$regex}; for my $binpkg ($info->binaries) { + next if $binpkg =~ m/-(doc|common|tools)$/; next if $binpkg !~ qr/$regex/; tag 'mismatched-python-substvar', $binpkg, $substvar if $info->binary_relation($binpkg, 'all')->implies($substvar); @@ -113,7 +114,7 @@ sub _run_binary { if not $info->relation('strong')->implies($version); } - if ($pkg =~ /^python([23]?)-.*(?<!-doc)(?<!-common)$/) { + if ($pkg =~ /^python([23]?)-.*(?<!-doc)(?<!-common)(?<!-tools)$/) { my $version = $1 || '2'; # Assume python-foo is a Python 2.x package my @prefixes = ($version eq '2') ? 'python3' : ('python', 'python2'); @@ -121,7 +122,7 @@ sub _run_binary { for my $prefix (@prefixes) { my $visit = sub { # Depending on python-module-doc, etc. is always fine - return if m/-(doc|common)$/; + return if m/-(doc|common|tools)$/; #<<< No tidy (tag name too long) tag 'python-package-depends-on-package-from-other-python-variant', "($field: $_)" if m/^$prefix-/; diff --git a/debian/changelog b/debian/changelog index fc154bf..944d54e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,8 @@ lintian (2.5.67) UNRELEASED; urgency=medium that depend on Python {3,2} packages when the package being depended on ends with -doc. We were previously only catching the case for dependencies *from* packages with such names. (Closes: #885693) - + [CL] Also ignore -common packages for intra-Python variant dependency - checking. + + [CL] Also ignore -common and -tools packages for intra-Python variant + dependency checking, python-foo-but-no-python3-foo, etc. * checks/rules.desc: + [CL] Suggest using /usr/share/dpkg/architecture.mk as a solution to debian-rules-sets-dpkg-architecture-variable rather than simply diff --git a/t/tests/python-mismatched-python-substvar/debian/debian/control.in b/t/tests/python-mismatched-python-substvar/debian/debian/control.in index 5650697..6250b41 100644 --- a/t/tests/python-mismatched-python-substvar/debian/debian/control.in +++ b/t/tests/python-mismatched-python-substvar/debian/debian/control.in @@ -53,3 +53,15 @@ Description: False positive Python 3.X be an empty package. . False positive package for Python 3.X. + +Package: python-{$source}-tools +Section: python +Architecture: all +Depends: $\{misc:Depends\}, $\{python3:Depends\} +Description: Generic tools 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. + . + Generic -tools packages are allowed. diff --git a/t/tests/python-mismatched-python-substvar/tags b/t/tests/python-mismatched-python-substvar/tags index ade1108..37b3600 100644 --- a/t/tests/python-mismatched-python-substvar/tags +++ b/t/tests/python-mismatched-python-substvar/tags @@ -1,4 +1,4 @@ E: python-mismatched-python-substvar source: python-depends-but-no-python-helper python-python-mismatched-python-substvar-nonrel python3-python-mismatched-python-substvar -E: python-mismatched-python-substvar source: python3-depends-but-no-python3-helper python-python-mismatched-python-substvar python3-python-mismatched-python-substvar-nonrel +E: python-mismatched-python-substvar source: python3-depends-but-no-python3-helper python-python-mismatched-python-substvar python-python-mismatched-python-substvar-tools python3-python-mismatched-python-substvar-nonrel W: python-mismatched-python-substvar source: mismatched-python-substvar python-python-mismatched-python-substvar ${python3:Depends} W: python-mismatched-python-substvar source: mismatched-python-substvar python3-python-mismatched-python-substvar ${python:Depends} 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 5656618..c467f05 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 @@ -48,3 +48,14 @@ Description: Python 2 package with corresponding Python 3 package (common files) be an empty package. . This package contains files common to both packages. + +Package: python-{$source}-tools +Architecture: all +Depends: $\{misc:Depends\} +Description: Python 2 package with corresponding Python 3 package (tools) + 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 contains tools. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

