Package: lintian Version: 2.5.44 Severity: normal Tags: patch Hi, When packaging newlisp, I noticed that lintian was displaying the 'unusual-interpreter' warning. However, after some research, I learned that lintian should take into account the fact that a package can actually install a new interpreter, and in this specific case the warning should be supressed. I took the liberty to hack lintian and found that the current check to see if there is a new interpreter being installed is incomplete, because it assumes that the executable file will be in the toplevel directory. The fix is simple: we should check if there is a file name $interpreter under /usr/bin, because that is where new executables are (usually) installed. I decided to extend the check instead of replacing it (i.e., lintian will still check if there is an executable called $interpreter on the topleve directory), but my gut feeling is that the old check could be removed safely. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/
From 20f0805afa856eecee39f95eb5e64a321040f71e Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Wed, 29 Jun 2016 01:08:11 -0400
Subject: [PATCH] Improve check to determine if the package installs a new
interpreter
The current check to determine if the package installs a new
interpreter is incomplete because it does not take into account the
fact that interpreters are usually installed under '/usr/bin'. This
patch improves and extends the check to include this case.
---
checks/scripts.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/checks/scripts.pm b/checks/scripts.pm
index a2afaee..f21ffd5 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -371,7 +371,8 @@ sub run {
}
} elsif ($interpreter =~ m,/usr/local/,) {
script_tag('interpreter-in-usr-local', $filename,"#!$interpreter");
- } elsif ($executable{'.' . $interpreter}) {
+ } elsif ($executable{'.' . $interpreter}
+ or $executable{'usr/bin' . $interpreter}) {
# Package installs the interpreter itself, so it's probably ok. Don't
# emit any tag for this.
} elsif ($interpreter eq '/bin/env') {
--
2.8.1
Attachment:
signature.asc
Description: PGP signature