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

[SCM] Debian package checker branch, master, updated. 2.2.6-78-g6f56cdb



The following commit has been merged in the master branch:
commit 90b42cd7277cf011e4478f5d17818f38a4a8ca40
Author: Russ Allbery <rra@debian.org>
Date:   Sun Mar 8 19:51:15 2009 -0700

    Restrict update-menus check to menu-methods only
    
    * checks/menus:
      + [RA] Explicit update-menus calls in postinst and postrm are no
        longer required unless menu-methods are installed.  Thanks, Eric
        Lavarde.  (Closes: #518712)

diff --git a/checks/menus b/checks/menus
index daeb62b..0d14dbf 100644
--- a/checks/menus
+++ b/checks/menus
@@ -148,26 +148,26 @@ close IN;
 
 # prerm scripts should not call update-menus
 if ($prerm{'calls-updatemenus'}) {
-    tag "prerm-calls-updatemenus", "";
+    tag "prerm-calls-updatemenus";
 }
 
 # postrm scripts should not call install-docs
 if ($postrm{'calls-installdocs'} or $postrm{'calls-installdocs-r'}) {
-    tag "postrm-calls-installdocs", "";
+    tag "postrm-calls-installdocs";
 }
 
 # preinst scripts should not call either update-menus nor installdocs
 if ($preinst{'calls-updatemenus'}) {
-    tag "preinst-calls-updatemenus", "";
+    tag "preinst-calls-updatemenus";
 }
 
 if ($preinst{'calls-installdocs'}) {
-    tag "preinst-calls-installdocs", "";
+    tag "preinst-calls-installdocs";
 }
 
 # don't set the /usr/doc link, the FHS transition is over (2002-10-08)
 if (defined $postinst{'sets-link'} && $postinst{'sets-link'} == 1) {
-    tag "postinst-should-not-set-usr-doc-link", "";
+    tag "postinst-should-not-set-usr-doc-link";
 }
 
 $anymenu_file = $menu_file || $menumethod_file;
@@ -202,22 +202,23 @@ if ($docbase_file) {		# postinst has to call install-docs
     }
 }
 
-if ($anymenu_file) {
+if ($menumethod_file) {
     # postinst has to call update-menus
     if (not $postinst{'calls-updatemenus'}) {
-	tag "postinst-does-not-call-updatemenus", "$anymenu_file";
+	tag "postinst-does-not-call-updatemenus", "$menumethod_file";
     }
     # postrm has to call update-menus
     if (not $postrm{'calls-updatemenus'}) {
-	tag "postrm-does-not-call-updatemenus", "$anymenu_file" unless $pkg eq 'menu';
+	tag "postrm-does-not-call-updatemenus", "$menumethod_file"
+	    unless $pkg eq 'menu';
     }
 } else {
     # postinst and postrm should not need to call update-menus
     if ($postinst{'calls-updatemenus'}) {
-	tag "postinst-has-useless-call-to-update-menus", "";
+	tag "postinst-has-useless-call-to-update-menus";
     }
     if ($postrm{'calls-updatemenus'}) {
-	tag "postrm-has-useless-call-to-update-menus", "";
+	tag "postrm-has-useless-call-to-update-menus";
     }
 }
 
diff --git a/checks/menus.desc b/checks/menus.desc
index 434f429..c8d1b63 100644
--- a/checks/menus.desc
+++ b/checks/menus.desc
@@ -124,9 +124,9 @@ Ref: doc-base 2.4
 Tag: postinst-does-not-call-updatemenus
 Severity: important
 Certainty: certain
-Info: Since the package installs a file in either <tt>/usr/lib/menu</tt> or
- <tt>/etc/menu-methods</tt>, the package should probably call the
- <tt>update-menus</tt> command in it's <tt>postinst</tt> script.
+Info: Since the package installs a file in <tt>/etc/menu-methods</tt>, the
+ package should probably call the <tt>update-menus</tt> command in it's
+ <tt>postinst</tt> script.
  .
  For example, use the following code in your maintainer script:
   if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
@@ -135,9 +135,9 @@ Ref: menu 4.2
 Tag: postrm-does-not-call-updatemenus
 Severity: important
 Certainty: certain
-Info: Since the package installs a file in either <tt>/usr/lib/menu</tt> or
- <tt>/etc/menu-methods</tt>, the package should probably call the
- <tt>update-menus</tt> command in it's <tt>postrm</tt> script.
+Info: Since the package installs a file in <tt>/etc/menu-methods</tt>, the
+ package should probably call the <tt>update-menus</tt> command in it's
+ <tt>postrm</tt> script.
  .
  For example, use the following code in your maintainer script:
   if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
@@ -147,15 +147,25 @@ Tag: postinst-has-useless-call-to-update-menus
 Severity: normal
 Certainty: certain
 Info: The <tt>postinst</tt> script calls the <tt>update-menus</tt> program
- though no file is installed in <tt>/usr/lib/menu</tt> or
- <tt>/etc/menu-methods</tt>.
+ though no file is installed in <tt>/etc/menu-methods</tt>.  Files
+ installed in <tt>/usr/share/menu</tt> or <tt>/usr/lib/menu</tt> are now
+ handled with triggers and don't need an explicit <tt>update-menus</tt>
+ invocation.
+ .
+ If the <tt>update-menus</tt> call was added by debhelper, rebuilding the
+ package with debhelper 7.2.3 or later will fix this problem.
 
 Tag: postrm-has-useless-call-to-update-menus
 Severity: normal
 Certainty: certain
 Info: The <tt>postrm</tt> script calls the <tt>update-menus</tt> program
- though no file is installed in <tt>/usr/lib/menu</tt> or
- <tt>/etc/menu-methods</tt>
+ though no file is installed in <tt>/etc/menu-methods</tt>.  Files
+ installed in <tt>/usr/share/menu</tt> or <tt>/usr/lib/menu</tt> are now
+ handled with triggers and don't need an explicit <tt>update-menus</tt>
+ invocation.
+ .
+ If the <tt>update-menus</tt> call was added by debhelper, rebuilding the
+ package with debhelper 7.2.3 or later will fix this problem.
 
 Tag: postinst-has-useless-call-to-install-docs
 Severity: important
diff --git a/debian/changelog b/debian/changelog
index be491d3..58dd221 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -91,6 +91,9 @@ lintian (2.2.7) UNRELEASED; urgency=low
       Geissert.  Also use all caps for global variables.
     + [RA] Move known doc-base formats from common_data.pm to here.  Patch
       from Raphael Geissert.
+    + [RA] Explicit update-menus calls in postinst and postrm are no
+      longer required unless menu-methods are installed.  Thanks, Eric
+      Lavarde.  (Closes: #518712)
   * checks/nmu:
     + [RA] Calculate the regex for Ubuntu distributions only once.
     + [RA] Be robust against whitespace in the Architecture field.
diff --git a/testset/tags.binary b/testset/tags.binary
index 6f4b30b..1d8f970 100644
--- a/testset/tags.binary
+++ b/testset/tags.binary
@@ -39,8 +39,8 @@ E: binary: non-wm-module-in-wm-modules-menu-section wm /usr/lib/menu/binary:22
 E: binary: non-wm-module-in-wm-modules-menu-section wm /usr/share/menu/binary:22
 E: binary: possible-gpl-code-linked-with-openssl
 E: binary: postinst-does-not-call-installdocs usr/share/doc-base/space 
-E: binary: postinst-does-not-call-updatemenus usr/share/menu/binary
-E: binary: postrm-does-not-call-updatemenus usr/share/menu/binary
+E: binary: postinst-does-not-call-updatemenus etc/menu-methods/lintian
+E: binary: postrm-does-not-call-updatemenus etc/menu-methods/lintian
 E: binary: prerm-does-not-call-installdocs usr/share/doc-base/space 
 E: binary: statically-linked-binary ./usr/bin/static-hello
 E: binary: su-wrapper-without--c /usr/lib/menu/binary:2 su-to-root
diff --git a/testset/tags.filenames b/testset/tags.filenames
index cdc9983..87fe1d2 100644
--- a/testset/tags.filenames
+++ b/testset/tags.filenames
@@ -18,8 +18,6 @@ E: filenames: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/
 E: filenames: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/testxbin2
 E: filenames: package-installs-packlist usr/lib/perl5/foo/.packlist
 E: filenames: postinst-does-not-call-installdocs usr/share/doc-base/filenames
-E: filenames: postinst-does-not-call-updatemenus usr/share/menu/menu
-E: filenames: postrm-does-not-call-updatemenus usr/share/menu/menu
 E: filenames: prerm-does-not-call-installdocs usr/share/doc-base/filenames
 E: filenames: subdir-in-usr-bin usr/bin/bin/
 E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink5wrong ../menu/../somethingelse

-- 
Debian package checker


Reply to: