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

[lintian] 01/01: checks/scripts: For "#!/usr/bin/env foo" shebang, check if (/usr)/bin/foo exists in the same package



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

jwilk pushed a commit to branch master
in repository lintian.

commit 9d85fd61a7848a0f831ef56c777f8fd236ee4a47
Author: Jakub Wilk <jwilk@debian.org>
Date:   Wed Jun 29 14:02:46 2016 +0200

    checks/scripts: For "#!/usr/bin/env foo" shebang, check if (/usr)/bin/foo exists in the same package
---
 checks/scripts.pm | 7 +++++++
 debian/changelog  | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/checks/scripts.pm b/checks/scripts.pm
index 12f0cff..5959e95 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -380,6 +380,13 @@ sub run {
                 # executable).
                 my $interfile = substr $interpreter, 1;
                 $pinter = 1 if $executable{$interfile};
+            } elsif (defined $calls_env) {
+                for my $dir (qw(usr/bin bin)) {
+                    if ($executable{"$dir/$interpreter"}) {
+                        $pinter = 1;
+                        last;
+                    }
+                }
             }
             script_tag('unusual-interpreter', $filename, "#!$interpreter")
               unless $pinter;
diff --git a/debian/changelog b/debian/changelog
index 34c432b..10a6ee9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,12 @@ lintian (2.5.46) UNRELEASED; urgency=medium
 
    XXX: generate tag summary with private/generate-tag-summary
 
+  * checks/scripts.pm:
+    + [JW] Fix false positive unusual-interpreter when the script had
+      "#!/usr/bin/env" shebang and the interpreter was shipped in the same
+      package.  Thanks to Sergio Durigan Junior for the bug report and the
+      initial patch.  (Closes: #828933)
+
   * commands/reporting-html-reports.pm:
     + [NT] Fix typo in named parameter that made the raw lintain.log
       unavailable on lintian.debian.org.  Thanks to Guillem Jover

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


Reply to: