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

lintian: r1028 - in trunk: checks debian testset



Author: rra
Date: 2007-12-04 04:58:11 +0100 (Tue, 04 Dec 2007)
New Revision: 1028

Modified:
   trunk/checks/scripts
   trunk/checks/scripts.desc
   trunk/debian/changelog
   trunk/testset/tags.libbaz
   trunk/testset/tags.maintainer-scripts
Log:
  + [RA] Remove possible-non-posix-code-in-maintainer-script entirely.
    Debian Policy now allows local and test -a/-o specifically and this
    is pointless portability.

Modified: trunk/checks/scripts
===================================================================
--- trunk/checks/scripts	2007-12-04 03:51:08 UTC (rev 1027)
+++ trunk/checks/scripts	2007-12-04 03:58:11 UTC (rev 1028)
@@ -526,7 +526,6 @@
 	    # check for things
 	    if ($cat_string eq "" and $checkbashisms and !$within_another_shell) {
 		my $found = 0;
-		my $found_strict = 0;
 		my $match = '';
 		my @bashism_string_regexs = (
 		  '\$\[\w+\]',		       # arith not allowed
@@ -548,10 +547,6 @@
 		  '\&>',		       # cshism
 		  '\[\[(?!:)',		       # alternative test command
 		);
-		my @strict_posix_regexs = (
-		  '((?:test|\[)\s+.+\s-[ao])\s',# test/[ -a/-o binary operators
-		  '(?:^\s*)local\s',	    # local scoping of variables
-					   );
 
 		# since this test is ugly, I have to do it by itself
 		# detect source (.) trying to pass args to the command it runs
@@ -590,20 +585,8 @@
 			}
 		    }
 		}
-		unless ($found) {
-		    for my $re (@strict_posix_regexs) {
-			if ($line =~ m/($re)/) {
-			    $found = 1;
-			    $found_strict = 1;
-			    ($match) = m/($re)/;
-			    last;
-			}
-		    }
-		}
 
-		if ($found && $found_strict) {
-		    tag "possible-non-posix-code-in-maintainer-script", "$file:$. \'$match\'";
-		} elsif ($found) {
+		if ($found) {
 		    tag "possible-bashism-in-maintainer-script", "$file:$. \'$match\'";
 		}
 	    }

Modified: trunk/checks/scripts.desc
===================================================================
--- trunk/checks/scripts.desc	2007-12-04 03:51:08 UTC (rev 1027)
+++ trunk/checks/scripts.desc	2007-12-04 03:58:11 UTC (rev 1028)
@@ -278,18 +278,6 @@
   '{foo,bar}' instead of 'foo bar'
   '[[ test ]]' instead of '[ test ]' (requires a Korn shell)
 
-Tag: possible-non-posix-code-in-maintainer-script
-Type: info
-Info: This script is marked as running under <tt>/bin/sh</tt>, but it seems
- to use a shell feature that is not defined in the SUSv3 or POSIX standard.
- The feature is so common in current shells that this isn't necessarily a
- bug, but you may wish to avoid this anyway for maximum portability.
- .
- Examples:
-  '-a' and '-o' as operators of 'test'. You can use shell conditionals
-  (&& and ||) instead, which also short-circuit correctly.
-  'local' scoping of variables.
-
 Tag: suidregister-used-in-maintainer-script
 Type: error
 Info: This script calls suidregister which is no longer needed, a new

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-12-04 03:51:08 UTC (rev 1027)
+++ trunk/debian/changelog	2007-12-04 03:58:11 UTC (rev 1028)
@@ -59,6 +59,9 @@
            be allowed to have csh in the shebang line. (Closes: #453417)
     + [HE] Allow packages to drop snippets into /etc/fish.d/ without
            a dependecy on fish. (Closes: #453416)
+    + [RA] Remove possible-non-posix-code-in-maintainer-script entirely.
+      Debian Policy now allows local and test -a/-o specifically and this
+      is pointless portability.
   * checks/standards-version:
     + [RA] 3.7.3 is now the current Standards-Version and anything older
       than 3.6.2 is ancient.

Modified: trunk/testset/tags.libbaz
===================================================================
--- trunk/testset/tags.libbaz	2007-12-04 03:51:08 UTC (rev 1027)
+++ trunk/testset/tags.libbaz	2007-12-04 03:58:11 UTC (rev 1028)
@@ -17,8 +17,6 @@
 E: libbaz2: postinst-must-call-ldconfig usr/lib/libbaz2.so.1.0.3b
 E: libbaz2: symlink-should-be-relative usr/share/doc/libbaz2/changelog.gz /usr/share/doc/lintian/changelog.gz
 I: libbaz1: no-md5sums-control-file
-I: libbaz1: possible-non-posix-code-in-maintainer-script postinst:6 '[ -d /usr/doc -a ! -e /usr/doc/$PKG -a '
-I: libbaz1: possible-non-posix-code-in-maintainer-script prerm:5 '[ \( "$1" = "upgrade" -o "$1" = "remove" \) -a '
 I: libbaz1: several-sonames-in-same-package libbaz2.so.1.0 libbaz3.so.1
 I: libbaz2-dev: no-md5sums-control-file
 I: libbaz2: no-md5sums-control-file

Modified: trunk/testset/tags.maintainer-scripts
===================================================================
--- trunk/testset/tags.maintainer-scripts	2007-12-04 03:51:08 UTC (rev 1027)
+++ trunk/testset/tags.maintainer-scripts	2007-12-04 03:58:11 UTC (rev 1028)
@@ -27,8 +27,6 @@
 E: maintainer-scripts: wrong-debian-qa-group-name QA group <packages@qa.debian.org>
 I: maintainer-scripts: no-md5sums-control-file
 I: maintainer-scripts: output-of-updaterc.d-not-redirected-to-dev-null bar postrm
-I: maintainer-scripts: possible-non-posix-code-in-maintainer-script postinst:4 '[ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a '
-I: maintainer-scripts: possible-non-posix-code-in-maintainer-script prerm:25 '   local '
 W: maintainer-scripts source: ancient-standards-version 3.1.1 (current is 3.7.3)
 W: maintainer-scripts source: changelog-should-mention-qa
 W: maintainer-scripts source: no-section-field



Reply to: