This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit 6a98ddc78b2e8a1822cfc48ebb5385ff61ccb7e7 Author: Chris Lamb <la...@debian.org> Date: Tue Feb 13 22:01:02 2018 +0000 Warn when specifying --parallel to dh(1) in compat levels >= 10. Thanks to Nicolas Braud-Santoni for the idea. (Closes: #890358) --- checks/debhelper.desc | 10 ++++++++++ checks/debhelper.pm | 6 ++++++ debian/changelog | 4 +++- t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules | 4 ++++ t/tests/debhelper-dh-unnecessary-arguments/desc | 5 +++++ t/tests/debhelper-dh-unnecessary-arguments/tags | 1 + 6 files changed, 29 insertions(+), 1 deletion(-) diff --git a/checks/debhelper.desc b/checks/debhelper.desc index 8bcf09e..26f17b8 100644 --- a/checks/debhelper.desc +++ b/checks/debhelper.desc @@ -420,3 +420,13 @@ Info: The <tt>debian/rules</tt> file for this package has an . Please replace these with calls to <tt>dh_installsystemd</tt>. Ref: debhelper(7) + +Tag: debian-rules-uses-unnecessary-dh-argument +Severity: minor +Certainty: certain +Info: The <tt>debian/rules</tt> file passes the specified argument to + <tt>dh $@</tt> but it is enabled by default from this debhelper + compatibility level onwards. + . + Please remove the argument from the call to <tt>dh(1)</tt>. +Ref: debhelper(7), dh(1) diff --git a/checks/debhelper.pm b/checks/debhelper.pm index d5d17bc..b462c0a 100644 --- a/checks/debhelper.pm +++ b/checks/debhelper.pm @@ -64,6 +64,7 @@ sub run { my ($bdepends_noarch, $bdepends, %build_systems, $uses_autotools_dev_dh); my $seen_dh = 0; + my $seen_dh_parallel = 0; my $seen_python_helper = 0; my $seen_python3_helper = 0; my %overrides; @@ -134,6 +135,7 @@ sub run { delete($build_systems{'debhelper'}); $seen_dh = 1; $seencommand = 1; + $seen_dh_parallel = 1 if m/--parallel/; $needbuilddepends = 1; $needtomodifyscripts = 1; while (m/\s--with(?:=|\s+)(['"]?)(\S+)\1/go) { @@ -331,6 +333,10 @@ sub run { if $line and $level >= 11; } + tag 'debian-rules-uses-unnecessary-dh-argument', 'dh ... --parallel', + "(line $.)" + if $seen_dh_parallel and $level >= 10; + # Check the files in the debian directory for various debhelper-related # things. for my $file ($droot->children) { diff --git a/debian/changelog b/debian/changelog index 973887f..5efa227 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,9 @@ lintian (2.5.75) UNRELEASED; urgency=medium * checks/changelog-file.desc: + [CL] When checking latest-debian-changelog-entry-without-new-version ignore any change of epoch. (Closes: #889991) - * checks/debhelper.desc: + * checks/debhelper.{desc,pm}: + + [CL] Warn when specifying --parallel to dh(1) in compat levels >= 10. + Thanks to Nicolas Braud-Santoni for the idea. (Closes: #890358) + [CL] Add a missing verb to the long description of the dh-quilt-addon-but-quilt-source-format tag. * checks/files.pm: diff --git a/t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules b/t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules new file mode 100755 index 0000000..ce2eb52 --- /dev/null +++ b/t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --parallel diff --git a/t/tests/debhelper-dh-unnecessary-arguments/desc b/t/tests/debhelper-dh-unnecessary-arguments/desc new file mode 100644 index 0000000..fda7fe5 --- /dev/null +++ b/t/tests/debhelper-dh-unnecessary-arguments/desc @@ -0,0 +1,5 @@ +Testname: debhelper-dh-unnecessary-arguments +Version: 1.0 +Description: Check for packages using --parallel +Test-For: + debian-rules-uses-unnecessary-dh-argument diff --git a/t/tests/debhelper-dh-unnecessary-arguments/tags b/t/tests/debhelper-dh-unnecessary-arguments/tags new file mode 100644 index 0000000..4708a5c --- /dev/null +++ b/t/tests/debhelper-dh-unnecessary-arguments/tags @@ -0,0 +1 @@ +W: debhelper-dh-unnecessary-arguments source: debian-rules-uses-unnecessary-dh-argument dh ... --parallel (line 13) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git