[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Also check, for example, "override_dh_fixperms-indep" targets for "override_dh_fixperms-does-not-call-dh_fixperms", etc.



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

lamby pushed a commit to branch master
in repository lintian.

commit 96dbae2f0c51fe900bff80bf598c82e429cc9a28
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Feb 16 19:58:38 2018 +0000

    Also check, for example, "override_dh_fixperms-indep" targets for "override_dh_fixperms-does-not-call-dh_fixperms", etc.
---
 checks/rules.pm                                              | 12 +++++++-----
 debian/changelog                                             |  2 ++
 .../debian/debian/rules                                      |  3 +++
 .../debian/debian/rules                                      |  1 +
 t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags      |  1 +
 5 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/checks/rules.pm b/checks/rules.pm
index 14dba97..dd1143f 100644
--- a/checks/rules.pm
+++ b/checks/rules.pm
@@ -435,11 +435,13 @@ sub run {
     }
 
     foreach my $cmd (qw(dh_clean dh_fixperms)) {
-        my $line = $overridden{$cmd};
-        tag "override_$cmd-does-not-call-$cmd", "(line $line)"
-          if $line
-          and none { m/^\t\s*-?($cmd\b|\$\(overridden_command\))/ }
-        @{$rules_per_target{"override_$cmd"}};
+        foreach my $suffix ('', '-indep') {
+            my $line = $overridden{"$cmd$suffix"};
+            tag "override_$cmd-does-not-call-$cmd", "(line $line)"
+              if $line
+              and none { m/^\t\s*-?($cmd\b|\$\(overridden_command\))/ }
+            @{$rules_per_target{"override_$cmd$suffix"}};
+        }
     }
 
     if (my $line = $overridden{'dh_auto_test'}) {
diff --git a/debian/changelog b/debian/changelog
index 4a7095a..b2a6f81 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ lintian (2.5.76) UNRELEASED; urgency=medium
     + [CL] Update override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS
       to fix a number of false positives. Thanks to Gregor Herrmann for
       the report.  (Closes: #890537)
+    + [CL] Also check, for example, "override_dh_fixperms-indep" targets
+      for "override_dh_fixperms-does-not-call-dh_fixperms", etc.
   * checks/scripts.pm:
     + [CL] Prevent some false-positives in udevadm-called-without-guard.
 
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules b/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules
index 871fb50..259aa5f 100755
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules
@@ -10,3 +10,6 @@ override_dh_clean:
 override_dh_fixperms:
 	true
 	$(overridden_command) # This rule is a false positive
+
+override_dh_fixperms-indep:
+	dh_fixperms
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules
index ad5753f..619cabd 100755
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules
@@ -6,3 +6,4 @@
 # Empty targets
 override_dh_clean:
 override_dh_fixperms:
+override_dh_fixperms-indep:
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags
index 1f2d41a..1f0eab1 100644
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags
@@ -1,2 +1,3 @@
 W: rules-override-dh-foo-does-not-call-dh-foo source: override_dh_clean-does-not-call-dh_clean (line 7)
 W: rules-override-dh-foo-does-not-call-dh-foo source: override_dh_fixperms-does-not-call-dh_fixperms (line 8)
+W: rules-override-dh-foo-does-not-call-dh-foo source: override_dh_fixperms-does-not-call-dh_fixperms (line 9)

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


Reply to: