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

lintian: r288 - in trunk: checks debian testset testset/binary/debian testset/maintainer-scripts/debian



Author: djpig
Date: 2004-06-18 22:15:25 +0200 (Fri, 18 Jun 2004)
New Revision: 288

Modified:
   trunk/checks/menus
   trunk/checks/menus.desc
   trunk/checks/scripts
   trunk/debian/changelog
   trunk/testset/binary/debian/postinst
   trunk/testset/maintainer-scripts/debian/postinst
   trunk/testset/tags.maintainer-scripts
Log:
menus:
+ Some clean-up and warn that wm-menu-config is deprecated (Closes: #248997)
+ Demote executable-in-usr-lib-menu to warning as executables
  are supported (but seldomly used) (Closes: #254498)
scripts:
Don't issue script-not-executable for menu-methods. There
are reasons why they are sometimes not executable (Closes: #250632)


Modified: trunk/checks/menus
===================================================================
--- trunk/checks/menus	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/checks/menus	2004-06-18 20:15:25 UTC (rev 288)
@@ -233,7 +233,7 @@
 
 sub check_script {
     my ($script,$pres) = @_;
-    my ($no_check_menu,$no_check_installdocs);
+    my ($no_check_menu,$no_check_installdocs,$no_check_wmmenu,$calls_wmmenu);
     my $interp;
 
     open(IN,"control/$script") or
@@ -289,17 +289,18 @@
 	if (s/-x\s+\S*wm-menu-config//o or /which\s+wm-menu-config/o
 	    or s/command\s+.*?wm-menu-config//o) {
 	    # yes, it does.
-	    $pres->{'checks-for-updatemenus'} = 1;
+	    $pres->{'checks-for-wmmenuconfig'} = 1;
 	}
 
 	# does the script call wm-menu-config?
-	if (m/wm-menu-config/) {
+	if (m/(?:^\s*|[;&|]\s*|(?:then|do)\s+)(?:\/usr\/sbin\/)?wm-menu-config(?:\s|[;&|<>]|$)/) {
 	    # yes, it does.
-	    $pres->{'calls-updatemenus'} = 1;
+	    $pres->{'calls-wmmenuconfig'} = 1;
+	    tag "maintainer-script-calls-deprecated-wm-menu-config", "$script:$." unless $calls_wmmenu++;
 
 	    # checked first?
-	    if (not $pres->{'checks-for-updatemenus'} and $pkg ne 'menu') {
-		tag "maintainer-script-does-not-check-for-existence-of-updatemenus", "$script:$." unless $no_check_menu++;
+	    if (not $pres->{'checks-for-wmmenuconfig'} and $pkg ne 'menu') {
+		tag "maintainer-script-does-not-check-for-existence-of-wm-menu-config", "$script:$." unless $no_check_wmmenu++;
 	    }
 	}
 
@@ -330,7 +331,7 @@
 	}
 
 	# does the script call install-docs?
-	if (m/install-docs/o) {
+	if (m/(?:^\s*|[;&|]\s*|(?:then|do)\s+)(?:\/usr\/sbin\/)?install-docs(?:\s|[;&|<>]|$)/) {
 	    # yes, it does.  Does it remove or add a doc?
 	    if (m/install-docs\s+(-r|--remove)\s/) {
 		$pres->{'calls-installdocs-r'} = 1;

Modified: trunk/checks/menus.desc
===================================================================
--- trunk/checks/menus.desc	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/checks/menus.desc	2004-06-18 20:15:25 UTC (rev 288)
@@ -1,7 +1,7 @@
 Check-Script: menus
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: men
-Standards-Version: 3.2.0
+Standards-Version: 3.6.1
 Type: binary
 Unpack-Level: 1
 Needs-Info: doc-base-files
@@ -20,9 +20,15 @@
  .
  For example, use the following code in your maintainer script:
   if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+
+Tag: maintainer-script-does-not-check-for-existence-of-wm-menu-config
+Type: error
+Info: The maintainer script calls the <tt>wm-menu-config</tt> command without
+ checking for existence first. (The <tt>menu</tt> package which provides
+ the command is not marked as `essential' package.)
  .
- Maintainers of window managers who call wm-menu-config but do not check for
- it first also trigger this warning.
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/sbin/wm-menu ]; then /usr/sbin/wm-menu-config; fi
 
 Tag: maintainer-script-does-not-check-for-existence-of-installdocs
 Type: error
@@ -35,6 +41,12 @@
     /usr/sbin/install-docs -i /usr/share/doc-base/&lt;your-package&gt;
   fi
 
+Tag: maintainer-script-calls-deprecated-wm-menu-config
+Type: warning
+Info: The use of the wm-menu-config script is deprecated because it's
+ design had some serious flaws. Please see the menu documentation,
+ chapter 5 for more information.
+
 Tag: preinst-calls-updatemenus
 Type: error
 Info: The preinst script calls the <tt>update-menus</tt> command. Usually,
@@ -56,8 +68,10 @@
  this command should be called from the <tt>prerm</tt> maintainer script.
 
 Tag: executable-in-usr-lib-menu
-Type: error
-Info: Files in <tt>/usr/lib/menu</tt> may not be marked as executables.
+Type: warning
+Info: Files in <tt>/usr/lib/menu</tt> should normally not be marked as
+ executables. You only need to do this if your package has to generate
+ menu entries dynamically.
 
 Tag: executable-in-usr-share-docbase
 Type: error

Modified: trunk/checks/scripts
===================================================================
--- trunk/checks/scripts	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/checks/scripts	2004-06-18 20:15:25 UTC (rev 288)
@@ -225,7 +225,8 @@
     tag_warn("script-not-executable", $filename)
 	unless ($executable{$filename} or
 		$filename =~ m,usr/(lib|share)/.*\.pm, or
-		$filename =~ m,\.in$,);
+		$filename =~ m,\.in$, or
+		$filename =~ m,etc/menu-methods,);
 
     if (exists $valid_interpreters{$base}) {
 	tag_error("wrong-path-for-$base", $filename, "#!$interpreter")

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/debian/changelog	2004-06-18 20:15:25 UTC (rev 288)
@@ -45,6 +45,10 @@
     + [FL] Fix regex which checks for update-menus calls (missing
       whitespace) and allow path before executable name (perhaps this
       should be another warning, though?) (Closes: #254420)
+    + [FL] Some clean-up and warn that wm-menu-config is deprecated
+      (Closes: #248997)
+    + [FL] Demote executable-in-usr-lib-menu to warning as executables
+      are supported (but seldomly used) (Closes: #254498)
   * checks/menu-format:
     + [FL] Fix su-to-root checks to cope with the new -X option and
       improve the option parsing to better handle unknown options
@@ -65,6 +69,8 @@
     + [CW] Add python2.4 as a valid interpreter (Closes: #254482)
     + [FL] Add ruby1.[68] as valid interpreters, introduce new
       ruby-script-but-no-ruby-dep error, copied from the python stuff
+    + [FL] Don't issue script-not-executable for menu-methods. There
+      are reasons why they are sometimes not executable (Closes: #250632)
   * checks/shared-libs:
     + [FL] Don't report shlib-with-executable-bit and
       shlib-with-bad-permissions on symbolic links to such files

Modified: trunk/testset/binary/debian/postinst
===================================================================
--- trunk/testset/binary/debian/postinst	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/testset/binary/debian/postinst	2004-06-18 20:15:25 UTC (rev 288)
@@ -3,4 +3,4 @@
 if [ $1 eq 'configure' ]
 then
 	suidregister hello-static root root 4755
-fi
\ No newline at end of file
+fi

Modified: trunk/testset/maintainer-scripts/debian/postinst
===================================================================
--- trunk/testset/maintainer-scripts/debian/postinst	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/testset/maintainer-scripts/debian/postinst	2004-06-18 20:15:25 UTC (rev 288)
@@ -24,3 +24,5 @@
 	--section foo
 
 echo Please use update-rc.d or invoke-rc.d to set up blah blah.
+
+wm-menu-config

Modified: trunk/testset/tags.maintainer-scripts
===================================================================
--- trunk/testset/tags.maintainer-scripts	2004-06-18 19:18:32 UTC (rev 287)
+++ trunk/testset/tags.maintainer-scripts	2004-06-18 20:15:25 UTC (rev 288)
@@ -1,11 +1,13 @@
 E: maintainer-scripts source: orphaned-package-should-not-have-uploaders
 E: maintainer-scripts source: wrong-debian-qa-group-name QA group <packages@qa.debian.org>
+E: maintainer-scripts: maintainer-script-does-not-check-for-existence-of-wm-menu-config postinst:28
 E: maintainer-scripts: maintainer-shell-script-fails-syntax-check prerm
 E: maintainer-scripts: no-copyright-file
 E: maintainer-scripts: wrong-debian-qa-group-name QA group <packages@qa.debian.org>
 W: maintainer-scripts source: ancient-standards-version 3.1.1
 W: maintainer-scripts source: changelog-should-mention-qa
 W: maintainer-scripts source: qa-upload-has-incorrect-version-number 7-0.1
+W: maintainer-scripts: maintainer-script-calls-deprecated-wm-menu-config postinst:28
 W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:12 '. /usr/share/lintian/shell foo'
 W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:15 'read'
 W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:17 'H[0]='



Reply to: