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

lintian: r522 - in trunk: checks debian testset



Author: djpig
Date: 2005-12-17 23:35:55 +0100 (Sat, 17 Dec 2005)
New Revision: 522

Modified:
   trunk/checks/scripts
   trunk/checks/scripts.desc
   trunk/debian/changelog
   trunk/testset/tags.scripts
Log:
Merge most of the wrong-path-for-* and *-script-but-no-*-dep tags to two tags
wrong-path-for-interpreter and missing-dep-for-interpreter. This makes
maintaining the list of valid interpreters way easier. Some tags with
special text have been special cased (php\d? and (m|g)awk).


Modified: trunk/checks/scripts
===================================================================
--- trunk/checks/scripts	2005-12-17 21:40:02 UTC (rev 521)
+++ trunk/checks/scripts	2005-12-17 22:35:55 UTC (rev 522)
@@ -130,6 +130,7 @@
 				'runhugs1.4' => 'hugs',
 				'runhugs98' => 'hugs98',
 				'scsh' => 'scsh',
+				'speedy' => 'speedy-cgi-perl',
 				'tcl' => 'tcl',
 				'tclsh' => 'tclsh',
 				'tclsh8.3' => 'tcl8.3',
@@ -242,16 +243,24 @@
 	    if ($base =~ /^(ruby|python)(?:\d\.\d)?$/) {
 		tag_error("wrong-path-for-$1", $filename, "#!$interpreter");
 	    } else {
-		tag_error("wrong-path-for-$base", $filename, "#!$interpreter");
+		tag_error("wrong-path-for-interpreter",
+			  "#!$interpreter != $valid_interpreters{$base}",
+			  "($filename)");
 	    }
 	}
-	
+
 	# Do not complain about dependencies for non-executable scripts.
 	if ($executable{$filename}) {
 	    if (exists $interpreter_dependencies{$base}) {
 		my @deps = split(/,/,$interpreter_dependencies{$base});
-		tag_error("$base-script-but-no-".$deps[0]."-dep", $filename)
-		    unless (scalar map { $deps{$_}?$_:() } @deps);
+		if ($base =~ /^(php\d?|(m|g)awk)/) {
+		    tag_error("$base-script-but-no-$deps[0]-dep", $filename)
+			unless (scalar map { $deps{$_}?$_:() } @deps);
+		} else {
+		    tag_error("missing-dep-for-interpreter",
+			      "$base => $deps[0]", "($filename)")
+			unless (scalar map { $deps{$_}?$_:() } @deps);
+		}
 	    } elsif ($base =~ /^python(\d.\d)?$/) {
 		my $ver = $1 ? $1 : "";
 		tag_error("python-script-but-no-python-dep", $filename)
@@ -261,9 +270,6 @@
 		my $ver = $1 ? $1 : "";
 		tag_error("ruby-script-but-no-ruby-dep", $filename)
 		    unless ($deps{"ruby$ver"});
-            } elsif ($base eq 'pike') {
-                tag_error("pike-script-but-no-pike-dep", $filename)
-                    unless ($deps{'pike'} or $deps{'pike7'});
 	    } elsif ($base eq 'perl' && $suid{$filename}) {
 		tag_error("suid-perl-script-but-no-perl-suid-dep", $filename)
 		    unless ($deps{'perl-suid'});

Modified: trunk/checks/scripts.desc
===================================================================
--- trunk/checks/scripts.desc	2005-12-17 21:40:02 UTC (rev 521)
+++ trunk/checks/scripts.desc	2005-12-17 22:35:55 UTC (rev 522)
@@ -68,18 +68,6 @@
  Please do not add a pre-dependency without following the policy for doing so.
  (Policy section 3.5).
 
-Tag: wrong-path-for-awk
-Type: error
-Info: Awk is installed as /usr/bin/awk on Debian systems.
-
-Tag: wrong-path-for-nawk
-Type: error
-Info: nawk is installed as /usr/bin/nawk on Debian systems.
-
-Tag: wrong-path-for-gawk
-Type: error
-Info: GNU awk is installed as /usr/bin/gawk on Debian systems.
-
 Tag: gawk-script-but-no-gawk-dep
 Type: error
 Info: Packages that use gawk scripts must depend on the gawk package.
@@ -89,10 +77,6 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-mawk
-Type: error
-Info: Mawk is installed as /usr/bin/mawk on Debian systems.
-
 Tag: mawk-script-but-no-mawk-dep
 Type: error
 Info: Packages that use mawk scripts must depend on the mawk package.
@@ -102,169 +86,21 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-burlap
+Tag: missing-dep-for-interpreter
 Type: error
-Info: burlap is installed as /usr/bin/burlap on Debian systems.
-
-Tag: burlap-script-but-no-felt-dep
-Type: error
-Info: Packages that use burlap scripts must depend on the felt package.
+Info: You used an interpreter for a script that is not in an essential
+ package. In most cases you will need to add a Dependency on the
+ package that contains the interpreter.
  .
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-csh
-Type: error
-Info: Csh is installed as /bin/csh on Debian systems.
-Ref: policy 10.4
-
-Tag: wrong-path-for-tcsh
-Type: error
-Info: Tcsh is installed as /usr/bin/tcsh on Debian systems.
-
-Tag: csh-script-but-no-c-shell-dep
-Type: error
-Info: Packages that use csh scripts must depend on the virtual package c-shell,
- which is provided by csh and tcsh.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-Ref: policy 10.4
-
 Tag: csh-considered-harmful
 Type: warning
 Info: The Debian policy for scripts explicitly warns against using csh
  and tcsh as scripting languages.
 Ref: policy 10.4
 
-Tag: wrong-path-for-ash
-Type: error
-Info: Ash is installed as /bin/ash on Debian systems.
-
-Tag: ash-script-but-no-ash-dep
-Type: error
-Info: Packages that use ash scripts must depend on the ash package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-dash
-Type: error
-Info: Dash is installed as /bin/dash on Debian systems.
-
-Tag: dash-script-but-no-dash-dep
-Type: error
-Info: Packages that use dash scripts must depend on the dash package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-sh
-Type: error
-Info: The Bourne shell is installed as /bin/sh on Debian systems.
-
-Tag: wrong-path-for-bash
-Type: error
-Info: Bash is installed as /bin/bash on Debian systems.
-
-Tag: wrong-path-for-ksh
-Type: error
-Info: Ksh is installed as /bin/ksh on Debian systems.
-
-Tag: ksh-script-but-no-pdksh-dep
-Type: error
-Info: Packages that use ksh scripts must depend on the pdksh package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-env
-Type: error
-Info: env is installed as /usr/bin/env on Debian systems.
-
-Tag: wrong-path-for-expect
-Type: error
-Info: Wish is installed as /usr/bin/expect on Debian systems.
-
-Tag: expect-script-but-no-expect-dep
-Type: error
-Info: Packages that use expect scripts must depend on the virtual
- package expect.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-gnuplot
-Type: error
-Info: gnuplot is installed as /usr/bin/gnuplot on Debian systems.
-
-Tag: gnuplot-script-but-no-gnuplot-dep
-Type: error
-Info: Packages that use gnuplot scripts must depend on the gnuplot package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-guile
-Type: error
-Info: guile is installed as /usr/bin/guile on Debian systems.
-
-Tag: guile-script-but-no-guile-dep
-Type: error
-Info: Packages that use guile scripts must depend on the virtual package
- `guile'.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-install-menu
-Type: error
-Info: Install-menu is installed as /usr/sbin/install-menu.
-
-Tag: wrong-path-for-js
-Type: error
-Info: js is installed as /usr/bin/js on Debian systems.
-
-Tag: js-script-but-no-ngs-js-dep
-Type: error
-Info: Packages that use js scripts must depend on the package ngs-js,
- which provides the interpreter.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-make
-Type: error
-Info: Make is installed as /usr/bin/make on Debian systems.
-
-Tag: make-script-but-no-make-dep
-Type: error
-Info: Packages that use make scripts must depend on the make package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-perl
-Type: error
-Info: Perl is installed as /usr/bin/perl on Debian systems.
-Ref: policy 10.4
-
-Tag: perl-5.004-script-but-no-perl-5.004-dep
-Type: error
-Info: Packages that use perl-5.004 scripts must depend on the perl-5.004
- package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: perl-5.005-script-but-no-perl-5.005-dep
-Type: error
-Info: Packages that use perl-5.005 scripts must depend on the perl-5.005
- package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
 Tag: suid-perl-script-but-no-perl-suid-dep
 Type: error
 Info: Packages that use perl scripts that are suid must depend on the
@@ -273,10 +109,6 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-php
-Type: error
-Info: PHP can be called as /usr/bin/php on Debian systems.
-
 Tag: php-script-but-no-php4-cli-dep
 Type: error
 Info: Packages that use PHP scripts with /usr/bin/php as interpreter must
@@ -287,10 +119,6 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-php4
-Type: error
-Info: PHP4 is installed as /usr/bin/php4 on Debian systems.
-
 Tag: php4-script-but-no-php4-cli-dep
 Type: error
 Info: Packages that use PHP4 scripts must depend on the php4-cli package. Note
@@ -300,28 +128,6 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-pike
-Type: error
-Info: Pike is installed as /usr/bin/pike on Debian systems.
-
-Tag: pike-script-but-no-pike-dep
-Type: error
-Info: Packages that use Pike scripts must depend on pike or pike7.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-pike7
-Type: error
-Info: Pike7 is installed as /usr/bin/pike7 on Debian systems.
-
-Tag: pike7-script-but-no-pike7-dep
-Type: error
-Info: Packages that use Pike7 scripts must depend on pike7.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
 Tag: wrong-path-for-python
 Type: error
 Info: Python is installed as /usr/bin/python on Debian systems.
@@ -334,6 +140,10 @@
  .
  Specific Ruby versions are installed as /usr/bin/rubyX.Y
 
+Tag: wrong-path-for-interpreter
+Type: error
+Info: The interpreter you used is installed at another location on Debian systems.
+
 Tag: python-script-but-no-python-dep
 Type: error
 Info: Packages with scripts that are executed with python must depend on the
@@ -360,154 +170,6 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-rc
-Type: error
-Info: The rc shell is installed as /usr/bin/rc on Debian systems.
-
-Tag: rc-script-but-no-rc-dep
-Type: error
-Info: Packages that use rc scripts must depend on the rc package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-regina
-Type: error
-Info: regina is installed as /usr/bin/regina on Debian systems.
-
-Tag: regina-script-but-no-regina-rexx-dep
-Type: error
-Info: Packages that use regina scripts must depend on the regina-rexx package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-rexx
-Type: error
-Info: rexx is installed as /usr/bin/rexx on Debian systems.
-
-Tag: rexx-script-but-no-regina-rexx-dep
-Type: error
-Info: Packages that use rexx scripts must depend on the regina-rexx package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-runhugs
-Type: error
-Info: Hugs is installed as /usr/bin/runhugs on Debian systems.
-
-Tag: wrong-path-for-runhugs1.4
-Type: error
-Info: Hugs is installed as /usr/bin/runhugs or /usr/bin/runhugs1.4 on Debian 
- systems.
-
-Tag: wrong-path-for-runhugs98
-Type: error
-Info: Hugs is installed as /usr/bin/runhugs or /usr/bin/runhugs98 on Debian 
- systems.
-
-Tag: runhugs1.4-script-but-no-hugs-dep
-Type: error
-Info: Packages that use runhugs scripts must depend on the hugs package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: runhugs98-script-but-no-hugs98-dep
-Type: error
-Info: Packages that use runhugs98 scripts must depend on the hugs98 package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-scsh
-Type: error
-Info: scsh is installed as /usr/bin/scsh on Debian systems.
-
-Tag: scsh-script-but-no-scsh-dep
-Type: error
-Info: Packages that use scsh scripts must depend on the scsh package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-sed
-Type: error
-Info: sed is installed as /bin/sed on Debian systems.
-
-Tag: wrong-path-for-trs
-Type: error
-Info: trs is installed as /usr/bin/trs on Debian systems.
-
-Tag: trs-script-but-no-konwert-dep
-Type: error
-Info: Packages that use trs scripts must depend on the konwert package,
- which provides that interpreter.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-tcl
-Type: error
-Info: Tcl is installed as /usr/bin/tcl on Debian systems.
-
-Tag: tcl-script-but-no-tcl-dep
-Type: error
-Info: Packages that use tcl scripts must depend on the virtual package tcl.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-tclsh
-Type: error
-Info: Tclsh is installed as /usr/bin/tclsh on Debian systems.
-
-Tag: wrong-path-for-tclsh8.3
-Type: error
-Info: Tclsh 8.3 is installed as /usr/bin/tclsh8.3 on Debian systems.
-
-Tag: wrong-path-for-tclsh8.4
-Type: error
-Info: Tclsh 8.4 is installed as /usr/bin/tclsh8.4 on Debian systems.
-
-Tag: tclsh-script-but-no-tclsh-dep
-Type: error
-Info: Packages that use tclsh scripts must depend on the virtual package tclsh.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: tclsh8.3-script-but-no-tcl8.3-dep
-Type: error
-Info: Packages that use tclsh8.3 scripts must depend on the package tcl8.3.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: tclsh8.4-script-but-no-tcl8.4-dep
-Type: error
-Info: Packages that use tclsh8.4 scripts must depend on the package tcl8.4.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-bltwish
-Type: error
-Info: bltwish is installed as /usr/bin/bltwish on Debian systems.
-
-Tag: bltwish-script-but-no-blt-dep
-Type: error
-Info: Packages that use bltwish scripts must depend on the blt package.
- It has superseded the blt8.0 package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-wish
-Type: error
-Info: Wish is installed as /usr/bin/wish on Debian systems.
-
 Tag: wish-script-but-no-wish-dep
 Type: error
 Info: Packages that use wish scripts must depend on the virtual package wish.
@@ -515,28 +177,6 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
-Tag: wrong-path-for-wish8.0
-Type: error
-Info: wish8.0 is installed as /usr/bin/wish8.0 on Debian systems.
-
-Tag: wish8.0-script-but-no-tk8.0-dep
-Type: error
-Info: Packages that use wish8.0 scripts must depend on the tk8.0 package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
-Tag: wrong-path-for-zsh
-Type: error
-Info: Zsh is installed as /usr/bin/zsh on Debian systems.
-
-Tag: zsh-script-but-no-zsh-dep
-Type: error
-Info: Packages that use zsh scripts must depend on the zsh package.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.
-
 Tag: calls-suidperl-directly
 Type: error
 Info: Since perl version 5.8.3-3, /usr/bin/suidperl shouldn't be called directly
@@ -656,14 +296,3 @@
  This should be avoided, as the correct syntax is 'chown user:group'.
  Using "." as a separator is still supported by the GNU tools, but it will
  fail as soon as a system uses the "." in user or group names.
-
-Tag: wrong-path-for-lefty
-Type: error
-Info: lefty is installed as /usr/bin/lefty on Debian systems.
-
-Tag: lefty-script-but-no-graphviz-dep
-Type: error
-Info: Packages that use lefty must depend on the package graphviz.
- .
- In some cases a weaker relationship, such as Suggests or Recommends, will
- be more appropriate.   

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2005-12-17 21:40:02 UTC (rev 521)
+++ trunk/debian/changelog	2005-12-17 22:35:55 UTC (rev 522)
@@ -32,6 +32,10 @@
     + [FL] Drop install-fvwmgenmenu as valid interpreter. Was dropped from menu package before sarge.
       (also for #332400, see checks/menu-format)
     + [FL] Change path for install-menu from /usr/sbin to /usr/bin (also for #332400)
+    + [FL] Merge most of the wrong-path-for-* and *-script-but-no-*-dep tags to two tags
+      wrong-path-for-interpreter and missing-dep-for-interpreter. This makes maintaining the
+      list of valid interpreters way easier. Some tags with special text have been special
+      cased (php\d? and (m|g)awk).
   * checks/shared-libs:
     + [FL] forgot /lib(32|64) (hopefully finally closes: #328612)
 

Modified: trunk/testset/tags.scripts
===================================================================
--- trunk/testset/tags.scripts	2005-12-17 21:40:02 UTC (rev 521)
+++ trunk/testset/tags.scripts	2005-12-17 22:35:55 UTC (rev 522)
@@ -1,10 +1,10 @@
 E: scripts: calls-suidperl-directly ./usr/bin/suidperlfoo
-E: scripts: lefty-script-but-no-graphviz-dep ./usr/bin/lefty-foo
+E: scripts: missing-dep-for-interpreter lefty => graphviz (./usr/bin/lefty-foo)
 E: scripts: no-copyright-file
 E: scripts: python-script-but-no-python-dep ./usr/bin/py2foo
 E: scripts: python-script-but-no-python-dep ./usr/bin/pyfoo
 E: scripts: suid-perl-script-but-no-perl-suid-dep ./usr/bin/suidperlfoo2
-E: scripts: wrong-path-for-lefty ./usr/bin/lefty-foo #!/usr/local/bin/lefty
+E: scripts: wrong-path-for-interpreter #!/usr/local/bin/lefty != /usr/bin/lefty (./usr/bin/lefty-foo)
 E: scripts: wrong-path-for-ruby ./usr/bin/rubyfoo #!/bin/ruby1.8
 W: scripts source: ancient-standards-version 3.2.1
 W: scripts source: changelog-should-mention-nmu



Reply to: