[SCM] Debian package checker branch, master, updated. 2.2.7-2-gfb2aa57
The following commit has been merged in the master branch:
commit fb2aa57a58644444abde19a2203f35e0f16e031f
Author: Russ Allbery <rra@debian.org>
Date: Mon Mar 9 20:40:41 2009 -0700
Partially revert the update-menus change
* checks/menus{,.desc}:
+ [RA] Revert the change to not require update-menus in postinst.
This is still needed due to #518919. Don't require update-menus in
postrm for regular menu files, only for menu-methods, but also don't
warn if it's present.
diff --git a/checks/menus b/checks/menus
index 5a2268a..81466cb 100644
--- a/checks/menus
+++ b/checks/menus
@@ -193,18 +193,24 @@ if ($docbase_file) {
closedir DOCBASEDIR;
}
-if ($menumethod_file) {
- # postinst has to call update-menus
+if ($anymenu_file) {
+ # postinst and postrm should not need to call update-menus unless there is
+ # a menu-method file. However, update-menus currently won't enable
+ # packages that have outstanding triggers, leading to an update-menus call
+ # being required for at least some packages right now. Until this bug is
+ # fixed, we still require it. See #518919 for more information.
+ #
+ # That bug does not require calling update-menus from postrm, but
+ # debhelper apparently currently still adds that to the maintainer script,
+ # so don't warn if it's done.
if (not $postinst{'calls-updatemenus'}) {
- tag "postinst-does-not-call-updatemenus", "$menumethod_file";
+ tag "postinst-does-not-call-updatemenus", "$anymenu_file";
}
- # postrm has to call update-menus
- if (not $postrm{'calls-updatemenus'}) {
+ if ($menumethod_file and not $postrm{'calls-updatemenus'}) {
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";
}
diff --git a/checks/menus.desc b/checks/menus.desc
index a793cac..517c514 100644
--- a/checks/menus.desc
+++ b/checks/menus.desc
@@ -98,9 +98,10 @@ Info: Files in <tt>/usr/share/doc-base</tt> may not be marked as executables.
Tag: postinst-does-not-call-updatemenus
Severity: important
Certainty: certain
-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.
+Info: Since the package installs a file in <tt>/etc/menu-methods</tt>,
+ <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</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
@@ -109,9 +110,10 @@ Ref: menu 4.2
Tag: postrm-does-not-call-updatemenus
Severity: important
Certainty: certain
-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.
+Info: Since the package installs a file in <tt>/etc/menu-methods</tt>,
+ <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</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
@@ -121,25 +123,15 @@ Tag: postinst-has-useless-call-to-update-menus
Severity: minor
Certainty: certain
Info: The <tt>postinst</tt> script calls the <tt>update-menus</tt> program
- 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.
+ though no file is installed in <tt>/etc/menu-methods</tt>,
+ <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</tt>.
Tag: postrm-has-useless-call-to-update-menus
Severity: minor
Certainty: certain
Info: The <tt>postrm</tt> script calls the <tt>update-menus</tt> program
- 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.
+ though no file is installed in <tt>/etc/menu-methods</tt>,
+ <tt>/usr/share/menu</tt>, or <tt>/usr/lib/menu</tt>.
Tag: postinst-has-useless-call-to-install-docs
Severity: minor
diff --git a/debian/changelog b/debian/changelog
index 22979a7..8320d6e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+lintian (2.2.8) UNRELEASED; urgency=low
+
+ * checks/menus{,.desc}:
+ + [RA] Revert the change to not require update-menus in postinst.
+ This is still needed due to #518919. Don't require update-menus in
+ postrm for regular menu files, only for menu-methods, but also don't
+ warn if it's present.
+
+ -- Russ Allbery <rra@debian.org> Mon, 09 Mar 2009 20:31:24 -0700
+
lintian (2.2.7) unstable; urgency=low
The "debhelper 7.2.3 and lots of fiddly infrastructure fixes" release.
diff --git a/t/tests/menus-script-check-ok/debian/debian/postinst b/t/tests/menus-script-check-ok/debian/debian/postinst
index e556841..8617b68 100644
--- a/t/tests/menus-script-check-ok/debian/debian/postinst
+++ b/t/tests/menus-script-check-ok/debian/debian/postinst
@@ -4,8 +4,7 @@ set -e
# Checks that the maintainer script checks for the existence of programs that
# it calls. This should produce no warnings except a bashism warning about
# using type, a warning about the deprecated wm-menu-config invocation, and a
-# warning for calling the deprecated update-menus and install-docs outside of
-# a trigger.
+# warning for calling the deprecated install-docs outside of a trigger.
if [ -x /usr/bin/update-menus ] ; then
update-menus
fi
diff --git a/t/tests/menus-script-check-ok/desc b/t/tests/menus-script-check-ok/desc
index ec435b3..23254aa 100644
--- a/t/tests/menus-script-check-ok/desc
+++ b/t/tests/menus-script-check-ok/desc
@@ -4,8 +4,6 @@ Version: 1.0
Description: Correct program checks in maintainer scripts
Test-For:
postinst-has-useless-call-to-install-docs
- postinst-has-useless-call-to-update-menus
- postrm-has-useless-call-to-update-menus
prerm-has-useless-call-to-install-docs
Test-Against:
maintainer-script-does-not-check-for-existence-of-installdocs
diff --git a/t/tests/menus-script-check-ok/tags b/t/tests/menus-script-check-ok/tags
index 2ffcc0d..ed87bfb 100644
--- a/t/tests/menus-script-check-ok/tags
+++ b/t/tests/menus-script-check-ok/tags
@@ -1,7 +1,5 @@
-W: menus-script-check-ok: maintainer-script-calls-deprecated-wm-menu-config postinst:13
-W: menus-script-check-ok: possible-bashism-in-maintainer-script postinst:15 'if type '
+W: menus-script-check-ok: maintainer-script-calls-deprecated-wm-menu-config postinst:12
+W: menus-script-check-ok: possible-bashism-in-maintainer-script postinst:14 'if type '
W: menus-script-check-ok: possible-bashism-in-maintainer-script postrm:3 'if type '
W: menus-script-check-ok: postinst-has-useless-call-to-install-docs
-W: menus-script-check-ok: postinst-has-useless-call-to-update-menus
-W: menus-script-check-ok: postrm-has-useless-call-to-update-menus
W: menus-script-check-ok: prerm-has-useless-call-to-install-docs
diff --git a/testset/tags.binary b/testset/tags.binary
index 0288a72..2d5ad3b 100644
--- a/testset/tags.binary
+++ b/testset/tags.binary
@@ -38,7 +38,7 @@ E: binary: non-wm-in-windowmanager-menu-section x11 /usr/share/menu/binary:4
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-updatemenus etc/menu-methods/lintian
+E: binary: postinst-does-not-call-updatemenus usr/share/menu/binary
E: binary: postrm-does-not-call-updatemenus etc/menu-methods/lintian
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 5f64deb..c2e436e 100644
--- a/testset/tags.filenames
+++ b/testset/tags.filenames
@@ -17,6 +17,7 @@ E: filenames: package-installs-file-to-usr-x11r6 usr/X11R6/
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-updatemenus usr/share/menu/menu
E: filenames: subdir-in-usr-bin usr/bin/bin/
E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink5wrong ../menu/../somethingelse
E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink6wrong ./file4
--
Debian package checker
Reply to: