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

[SCM] Debian package checker branch, master, updated. 2.3.3-74-g317d91d



The following commit has been merged in the master branch:
commit 277150e13712d2f08a8b000722b9f38dcb01bbc3
Author: Russ Allbery <rra@debian.org>
Date:   Sun Mar 21 20:41:34 2010 -0700

    Allow non-executable *.pm files in examples with #!perl
    
    * checks/scripts{,.desc}:
      + [RA] Allow non-executable *.pm files in the examples directory to
        start with a line like #!perl.  This is probably just an editor
        hint.  Thanks, Thijs Kinkhorst.  (Closes: #574826)
      + [RA] Mention #!@BASH@ and similar cases in the long tag description
        of example-interpreter-not-absolute.

diff --git a/checks/scripts b/checks/scripts
index 60c8d70..b8c1f41 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -360,6 +360,14 @@ for my $filename (sort keys %{$info->scripts}) {
     next if ($filename !~ m,(bin/|etc/init\.d/), and !$executable{$filename}
              and !$is_absolute and !$in_examples);
 
+    # Example directories sometimes contain Perl libraries, and some people
+    # use initial lines like #!perl or #!python to provide editor hints, so
+    # skip those too if they're not executable.  Be conservative here, since
+    # it's not uncommon for people to both not set examples executable and not
+    # fix the path and we want to warn about that.
+    next if ($filename !~ /\.pm\z/ and !$executable{$filename}
+	     and !$is_absolute and $in_examples);
+
     if ($interpreter eq "") {
 	script_tag("script-without-interpreter", $filename);
 	next;
diff --git a/checks/scripts.desc b/checks/scripts.desc
index 1b4e060..28d4bed 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -49,7 +49,9 @@ Certainty: certain
 Info: This example script uses a relative path to locate its interpreter.
  This path will be taken relative to the caller's current directory, not
  the script's, so a user will probably not be able to run the example
- without modification.
+ without modification.  This tag can also be caused by script headers like
+ <tt>#!@BASH@</tt>, which usually mean that the examples were copied out
+ of the source tree before proper Autoconf path substitution.
 
 Tag: unusual-interpreter
 Severity: normal
diff --git a/debian/changelog b/debian/changelog
index 9949600..41a49a1 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -77,10 +77,15 @@ lintian (2.3.4) UNRELEASED; urgency=low
     + [RG] Warn about installing files specifying the destination
       directory with PREFIX when Perl's MakeMaker build system is used.
       Based on a patch by Niko Tyni.  (Closes: #568748)
-  * checks/scripts:
+  * checks/scripts{,.desc}:
     + [ADB] Update the list of octave interpreters, adding octave3.2
       (Closes: #574048) and removing octave2.1 (only available in lenny
       and earlier) and octave3.1.
+    + [RA] Allow non-executable *.pm files in the examples directory to
+      start with a line like #!perl.  This is probably just an editor
+      hint.  Thanks, Thijs Kinkhorst.  (Closes: #574826)
+    + [RA] Mention #!@BASH@ and similar cases in the long tag description
+      of example-interpreter-not-absolute.
   * checks/shared-libs:
     + [RA] symbols-declares-dependency-on-other-package should not have
       trailing whitespace for unversioned dependencies.  Patch from

-- 
Debian package checker


Reply to: