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

Bug#816341: Patch



Control: tag -1 patch

Patch that restricts the tag to install/manpages files is attached. Good
catch, thanks!

-- 
|8]
>From bbec428b16b73deaae0dab1e1fe52ba10c87da98 Mon Sep 17 00:00:00 2001
From: Gergely Nagy <algernon@madhouse-project.org>
Date: Tue, 1 Mar 2016 08:58:17 +0100
Subject: [PATCH] dh-exec-useless-usage applies to install/manpages only

Using ${DEB_HOST_MULTIARCH} in, say, dirs is perfectly legitimate. Do
the test for install/manpages files only. Fixes #816341.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
---
 checks/debhelper.pm                          | 2 +-
 debian/changelog                             | 3 +++
 t/tests/debhelper-dh-exec/debian/debian/dirs | 1 +
 t/tests/debhelper-dh-exec/debian/debian/docs | 2 ++
 t/tests/debhelper-dh-exec/tags               | 2 +-
 5 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100755 t/tests/debhelper-dh-exec/debian/debian/docs

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 360a75a..aa47cb3 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -504,7 +504,7 @@ sub _check_dh_exec {
                     $dhe_useless = 1;
                 }
             }
-            if ($dhe_useless) {
+            if ($dhe_useless && $path =~ /debian\/.*(install|manpages)/ ) {
                 my $form = $_;
                 chomp($form);
                 $form = "\"$form\"";
diff --git a/debian/changelog b/debian/changelog
index 1bc9ae6..adea20e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,9 @@ lintian (2.5.42) UNRELEASED; urgency=medium
   * checks/systemd.{desc,pm}:
     + [NT] Apply patch from Chris Lamb to flag systemd units
       without the "Documentation" key.  (Closes: #799083)
+  * checks/debhelper.pm:
+    + [GN] Only do the dh-exec-useless-usage check for install and
+      manpages files.   (Closes: #816341)
 
   * data/scripts/interpreters:
     + [JW] Add hhvm as a known interpreter.  (Closes: #789878)
diff --git a/t/tests/debhelper-dh-exec/debian/debian/dirs b/t/tests/debhelper-dh-exec/debian/debian/dirs
index bc147d0..1540bd9 100755
--- a/t/tests/debhelper-dh-exec/debian/debian/dirs
+++ b/t/tests/debhelper-dh-exec/debian/debian/dirs
@@ -1,2 +1,3 @@
 #! /usr/bin/dh-exec
 usr/lib
+usr/lib/${DEB_HOST_MULTIARCH}/octave/packages
\ No newline at end of file
diff --git a/t/tests/debhelper-dh-exec/debian/debian/docs b/t/tests/debhelper-dh-exec/debian/debian/docs
new file mode 100755
index 0000000..55634c1
--- /dev/null
+++ b/t/tests/debhelper-dh-exec/debian/debian/docs
@@ -0,0 +1,2 @@
+#! /usr/bin/dh-exec
+debian/rules
\ No newline at end of file
diff --git a/t/tests/debhelper-dh-exec/tags b/t/tests/debhelper-dh-exec/tags
index 6d45ebe..d5030b2 100644
--- a/t/tests/debhelper-dh-exec/tags
+++ b/t/tests/debhelper-dh-exec/tags
@@ -5,4 +5,4 @@ I: debhelper-dh-exec source: dh-exec-subst-unknown-variable debian/manpages DEB_
 I: debhelper-dh-exec source: dh-exec-useless-usage debian/install "usr/lib/${DEB_HOST_MULTIARCH} /usr/lib/${DEB_HOST_MULTIARCH}/"
 I: debhelper-dh-exec source: dh-exec-useless-usage debian/install "usr/lib/${DEB_HOST_MULTIARCH}"
 I: debhelper-dh-exec source: dh-exec-useless-usage debian/install "usr/lib/${DEB_HOST_MULTIARCH}/some-package/*.so"
-W: debhelper-dh-exec source: dh-exec-script-without-dh-exec-features debian/dirs
+W: debhelper-dh-exec source: dh-exec-script-without-dh-exec-features debian/docs
-- 
2.7.0


Reply to: