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

[SCM] Debian package checker branch, master, updated. 2.5.6-33-gb74afdd



The following commit has been merged in the master branch:
commit b74afdd6b0d0e6da7a9341c699ad3c81296cfa78
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Mar 27 21:36:03 2012 +0200

    scripts: Skip unusual-interpreter if the package provides it
    
    Do not emit unusual-interpreter if the package provides the
    interpreter for the script (and the interpreter is executable).
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/scripts b/checks/scripts
index b2e621a..1c47250 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -387,7 +387,16 @@ for my $filename (sort keys %{$info->scripts}) {
     } elsif ($interpreter eq '/bin/env') {
         script_tag('script-uses-bin-env', $filename);
     } else {
-        script_tag('unusual-interpreter', $filename, "#!$interpreter");
+        my $pinter = 0;
+        if ($interpreter =~ m,^/,) {
+            # Check if the package ships the interpreter (and it is
+            # executable).
+            my $interfile = substr $interpreter, 1;
+            my $index_info = $info->index->{$interfile};
+            $pinter = 1 if $index_info && ($index_info->{operm} & 0111);
+        }
+        script_tag('unusual-interpreter', $filename, "#!$interpreter")
+            unless $pinter;
     }
 
     # Check for obsolete perl libraries
diff --git a/checks/scripts.desc b/checks/scripts.desc
index c243549..9895c83 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -56,17 +56,20 @@ Info: This example script uses a relative path to locate its interpreter.
 Tag: unusual-interpreter
 Severity: normal
 Certainty: possible
-Info: This package contains a script for an interpreter that the Lintian
- maintainers have not heard of.  It could be a typo for a common
- interpreter.  If not, please file a wishlist bug on lintian so that the
- Lintian maintainers can add this interpreter to their list.
+Info: This package contains a script for an interpreter that is not shipped
+ in the package and is not known to Lintian.  It is possible that there is
+ a typo or the interpreter is not executable.  If not, please file a
+ wishlist bug against lintian, so it can be added to the list of known
+ interpreters.
 
 Tag: example-unusual-interpreter
 Severity: pedantic
 Certainty: possible
-Info: This package contains an example script for an interpreter that the
- Lintian maintainers have not heard of.  It could be a typo for a common
- interpreter.
+Info: This package contains an example script for an interpreter that
+ is not shipped in the package and is not known to Lintian.  It is
+ possible that there is a typo or the interpreter is not executable.
+ If not, please file a wishlist bug against lintian, so it can be
+ added to the list of known interpreters.
 
 Tag: script-uses-bin-env
 Severity: normal
diff --git a/debian/changelog b/debian/changelog
index b7203f3..11379c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,9 +39,11 @@ lintian (2.5.7) UNRELEASED; urgency=low
       change.  Thanks, Iustin Pop.  (Closes: #664471)
   * checks/menus{,.desc}:
     + [NT] Remove "manual" lazy load of data file.
-  * checks/scripts.desc:
+  * checks/scripts{,.desc}:
     + [NT] Mention devref 6.4 in command-with-path-in-maintainer-script.
       Thanks to Arno Töll for the patch.
+    + [NT] Do not emit unusual-interpreter if the package provides the
+      interpreter itself.
 
   * collection/*:
     + [NT] Use Lintian::Collect to access the package index.

-- 
Debian package checker


Reply to: