This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit b02a1df6380a35510e00cbf1b10dac6c9966f4be
Author: Chris Lamb <la...@debian.org>
Date:   Mon Apr 9 17:31:21 2018 +0100

    Add a special case for the python3 addon as it needs a dependency on 
dh-python unless the -dev packages are used. (Closes: #895284)
---
 checks/debhelper.pm                                      | 10 ++++++++++
 debian/changelog                                         |  4 ++++
 .../debian/debian/control.in                             | 16 ++++++++++++++++
 .../debhelper-dh-with-python3-unrel/debian/debian/rules  |  4 ++++
 t/tests/debhelper-dh-with-python3-unrel/desc             |  5 +++++
 t/tests/debhelper-dh-with-python3-unrel/tags             |  0
 .../debian/debian/control.in                             | 16 ++++++++++++++++
 .../debhelper-dh-with-python3-unrel2/debian/debian/rules |  4 ++++
 t/tests/debhelper-dh-with-python3-unrel2/desc            |  6 ++++++
 t/tests/debhelper-dh-with-python3-unrel2/tags            |  0
 .../debhelper-dh-with-python3/debian/debian/control.in   | 16 ++++++++++++++++
 t/tests/debhelper-dh-with-python3/debian/debian/rules    |  4 ++++
 t/tests/debhelper-dh-with-python3/desc                   |  5 +++++
 t/tests/debhelper-dh-with-python3/tags                   |  1 +
 14 files changed, 91 insertions(+)

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 3c65281..d5f731d 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -465,6 +465,16 @@ sub run {
     while (my ($dep, $addon) = each %missingbdeps_addons) {
         tag 'missing-build-dependency-for-dh-addon', "$addon => $dep"
           unless ($bdepends_noarch->implies($dep));
+
+        # As a special case, the python3 addon needs a dependency on
+        # dh-python unless the -dev packages are used.
+        my $pkg = 'dh-python';
+        tag 'missing-build-dependency-for-dh-addon',"$addon => $pkg"
+          if $addon eq 'python3'
+          && $bdepends_noarch->implies($dep)
+          && !$bdepends_noarch->implies(
+            'python3-dev:any | python3-all-dev:any')
+          && !$bdepends_noarch->implies($pkg);
     }
 
     $dh_bd_version = $level if not defined($dh_bd_version);
diff --git a/debian/changelog b/debian/changelog
index d284aa9..0a5275c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ lintian (2.5.82) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/debhelper.pm:
+    + [CL] Add a special case for the python3 addon as it needs a
+      dependency on dh-python unless the -dev packages are used.
+      Thanks to Julian Andres Klode for the report.  (Closes: #895284)
   * checks/python.pm:
     + [CL] Apply patch from Pierre-Elliott Bécue to loosen the changelog
       parsing of the new-package-should-not-package-python2-module tag to
diff --git a/t/tests/debhelper-dh-with-python3-unrel/debian/debian/control.in 
b/t/tests/debhelper-dh-with-python3-unrel/debian/debian/control.in
new file mode 100644
index 0000000..6182a2f
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3-unrel/debian/debian/control.in
@@ -0,0 +1,16 @@
+Source: {$source}
+Priority: optional
+Section: python
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}, python3, dh-python
+Rules-Requires-Root: no
+
+Package: python3-{$source}
+Architecture: {$architecture}
+Depends: $\{misc:Depends\}
+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/debhelper-dh-with-python3-unrel/debian/debian/rules 
b/t/tests/debhelper-dh-with-python3-unrel/debian/debian/rules
new file mode 100755
index 0000000..25115de
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3-unrel/debian/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ --with python3
diff --git a/t/tests/debhelper-dh-with-python3-unrel/desc 
b/t/tests/debhelper-dh-with-python3-unrel/desc
new file mode 100644
index 0000000..e5418cb
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3-unrel/desc
@@ -0,0 +1,5 @@
+Testname: debhelper-dh-with-python3-unrel
+Version: 1.0
+Description: Check dependency requirements for dh --with python3 (false 
positive)
+Test-Against:
+ missing-build-dependency-for-dh-addon
diff --git a/t/tests/debhelper-dh-with-python3-unrel/tags 
b/t/tests/debhelper-dh-with-python3-unrel/tags
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/debhelper-dh-with-python3-unrel2/debian/debian/control.in 
b/t/tests/debhelper-dh-with-python3-unrel2/debian/debian/control.in
new file mode 100644
index 0000000..2e9a3c7
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3-unrel2/debian/debian/control.in
@@ -0,0 +1,16 @@
+Source: {$source}
+Priority: optional
+Section: python
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}, python3-all-dev
+Rules-Requires-Root: no
+
+Package: python3-{$source}
+Architecture: {$architecture}
+Depends: $\{misc:Depends\}
+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/debhelper-dh-with-python3-unrel2/debian/debian/rules 
b/t/tests/debhelper-dh-with-python3-unrel2/debian/debian/rules
new file mode 100755
index 0000000..25115de
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3-unrel2/debian/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ --with python3
diff --git a/t/tests/debhelper-dh-with-python3-unrel2/desc 
b/t/tests/debhelper-dh-with-python3-unrel2/desc
new file mode 100644
index 0000000..8ac74b0
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3-unrel2/desc
@@ -0,0 +1,6 @@
+Testname: debhelper-dh-with-python3-unrel2
+Version: 1.0
+Description: Check dependency requirements for dh --with python3 (false 
positive)
+Architecture: any
+Test-Against:
+ missing-build-dependency-for-dh-addon
diff --git a/t/tests/debhelper-dh-with-python3-unrel2/tags 
b/t/tests/debhelper-dh-with-python3-unrel2/tags
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/debhelper-dh-with-python3/debian/debian/control.in 
b/t/tests/debhelper-dh-with-python3/debian/debian/control.in
new file mode 100644
index 0000000..9a4db52
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3/debian/debian/control.in
@@ -0,0 +1,16 @@
+Source: {$source}
+Priority: optional
+Section: python
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}, python3
+Rules-Requires-Root: no
+
+Package: python3-{$source}
+Architecture: {$architecture}
+Depends: $\{misc:Depends\}
+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/debhelper-dh-with-python3/debian/debian/rules 
b/t/tests/debhelper-dh-with-python3/debian/debian/rules
new file mode 100755
index 0000000..25115de
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3/debian/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ --with python3
diff --git a/t/tests/debhelper-dh-with-python3/desc 
b/t/tests/debhelper-dh-with-python3/desc
new file mode 100644
index 0000000..c66b69f
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3/desc
@@ -0,0 +1,5 @@
+Testname: debhelper-dh-with-python3
+Version: 1.0
+Description: Check dependency requirements for dh --with python3
+Test-For:
+ missing-build-dependency-for-dh-addon
diff --git a/t/tests/debhelper-dh-with-python3/tags 
b/t/tests/debhelper-dh-with-python3/tags
new file mode 100644
index 0000000..45d9d4a
--- /dev/null
+++ b/t/tests/debhelper-dh-with-python3/tags
@@ -0,0 +1 @@
+E: debhelper-dh-with-python3 source: missing-build-dependency-for-dh-addon 
python3 => dh-python

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git

Reply via email to