[SCM] Debian package checker branch, master, updated. 2.2.6-78-g6f56cdb
The following commit has been merged in the master branch:
commit 9699ae6b48100a621bce2a582d09a4a41c53700a
Author: Russ Allbery <rra@debian.org>
Date: Sun Mar 8 20:31:27 2009 -0700
doc-base registration is now handled with triggers
* checks/menus:
+ [RA] Explicit install-docs calls are no longer needed since doc-base
registration is done with triggers. (Closes: #518801)
diff --git a/checks/menus b/checks/menus
index 0d14dbf..5a2268a 100644
--- a/checks/menus
+++ b/checks/menus
@@ -172,18 +172,17 @@ if (defined $postinst{'sets-link'} && $postinst{'sets-link'} == 1) {
$anymenu_file = $menu_file || $menumethod_file;
+# No one needs to call install-docs any more; triggers now handles that.
+if ($postinst{'calls-installdocs'} or $postinst{'calls-installdocs-r'}) {
+ tag "postinst-has-useless-call-to-install-docs";
+}
+if ($prerm{'calls-installdocs'} or $prerm{'calls-installdocs-r'}) {
+ tag "prerm-has-useless-call-to-install-docs";
+}
+
# check consistency
# docbase file?
-if ($docbase_file) { # postinst has to call install-docs
- if (not $postinst{'calls-installdocs'}) {
- tag "postinst-does-not-call-installdocs", "$docbase_file";
- }
- # prerm has to call install-docs -r
- if (not $prerm{'calls-installdocs-r'}) {
- tag "prerm-does-not-call-installdocs", "$docbase_file";
- }
-
- # check the contents of the doc-base file(s)
+if ($docbase_file) {
opendir DOCBASEDIR, "doc-base" or fail("cannot read doc-base directory.");
my $dbfile;
while (defined ($dbfile = readdir DOCBASEDIR)) {
@@ -192,14 +191,6 @@ if ($docbase_file) { # postinst has to call install-docs
check_doc_base_file($dbfile, $pkg, $type, \%all_files, \%all_links);
}
closedir DOCBASEDIR;
-} else {
- # postinst and postrm should not need to call install-docs
- if ($postinst{'calls-installdocs'} or $postinst{'calls-installdocs-r'}) {
- tag "postinst-has-useless-call-to-install-docs", "";
- }
- if ($prerm{'calls-installdocs'} or $prerm{'calls-installdocs-r'}) {
- tag "prerm-has-useless-call-to-install-docs", "";
- }
}
if ($menumethod_file) {
diff --git a/checks/menus.desc b/checks/menus.desc
index c8d1b63..4a266e4 100644
--- a/checks/menus.desc
+++ b/checks/menus.desc
@@ -95,32 +95,6 @@ Severity: important
Certainty: certain
Info: Files in <tt>/usr/share/doc-base</tt> may not be marked as executables.
-Tag: postinst-does-not-call-installdocs
-Severity: important
-Certainty: certain
-Info: Since the package installs a file in <tt>/usr/share/doc-base</tt>, the
- package should probably call the <tt>install-docs</tt> command in its
- <tt>postinst</tt> script.
- .
- For example, use the following code in your maintainer script:
- if [ -x /usr/sbin/install-docs ]; then
- /usr/sbin/install-docs -i /usr/share/doc-base/<your-package>
- fi
-Ref: doc-base 2.4
-
-Tag: prerm-does-not-call-installdocs
-Severity: important
-Certainty: certain
-Info: Since the package installs a file in <tt>/usr/share/doc-base</tt>, the
- package should probably call the <tt>install-docs</tt> command in its
- <tt>prerm</tt> script.
- .
- For example, use the following code in your maintainer script:
- if [ -x /usr/sbin/install-docs ]; then
- /usr/sbin/install-docs -r <your-package> || true
- fi
-Ref: doc-base 2.4
-
Tag: postinst-does-not-call-updatemenus
Severity: important
Certainty: certain
@@ -168,16 +142,20 @@ Info: The <tt>postrm</tt> script calls the <tt>update-menus</tt> program
package with debhelper 7.2.3 or later will fix this problem.
Tag: postinst-has-useless-call-to-install-docs
-Severity: important
+Severity: minor
Certainty: certain
-Info: The <tt>postinst</tt> script calls the <tt>install-docs</tt> program
- though no file is installed in <tt>/usr/share/doc-base</tt>.
+Info: Explicitly calling <tt>install-docs</tt> in <tt>postinst</tt> is no
+ longer required since doc-base file processing is handled by triggers.
+ If the <tt>install-docs</tt> call was added by debhelper, rebuilding the
+ package with debhelper 7.2.3 or later will fix this problem.
Tag: prerm-has-useless-call-to-install-docs
-Severity: important
+Severity: minor
Certainty: certain
-Info: The <tt>prerm</tt> script calls the <tt>install-docs</tt> program
- though no file is installed in <tt>/usr/share/doc-base</tt>.
+Info: Explicitly calling <tt>install-docs</tt> in <tt>prerm</tt> is no
+ longer required since doc-base file processing is handled by triggers.
+ If the <tt>install-docs</tt> call was added by debhelper, rebuilding the
+ package with debhelper 7.2.3 or later will fix this problem.
Tag: bad-menu-file-name
Severity: important
diff --git a/debian/changelog b/debian/changelog
index 58dd221..97c2233 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ lintian (2.2.7) UNRELEASED; urgency=low
- remove-of-unknown-diversion
+ Removed
- description-synopsis-has-leading-spaces
+ - postinst-does-not-call-installdocs
+ - prerm-does-not-call-installdocs
* checks/binaries{,.desc}:
+ [RA] Check for embedded copies of zlib in ELF binaries by looking
@@ -94,6 +96,8 @@ lintian (2.2.7) UNRELEASED; urgency=low
+ [RA] Explicit update-menus calls in postinst and postrm are no
longer required unless menu-methods are installed. Thanks, Eric
Lavarde. (Closes: #518712)
+ + [RA] Explicit install-docs calls are no longer needed since doc-base
+ registration is done with triggers. (Closes: #518801)
* checks/nmu:
+ [RA] Calculate the regex for Ubuntu distributions only once.
+ [RA] Be robust against whitespace in the Architecture field.
diff --git a/t/tests/menus-script-check-ok/debian/debian/postinst b/t/tests/menus-script-check-ok/debian/debian/postinst
index 091248c..e556841 100644
--- a/t/tests/menus-script-check-ok/debian/debian/postinst
+++ b/t/tests/menus-script-check-ok/debian/debian/postinst
@@ -1,10 +1,11 @@
#!/bin/sh
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 and a warning about the deprecated wm-menu-config
-# invocation.
+# 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.
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 ab62fab..ec435b3 100644
--- a/t/tests/menus-script-check-ok/desc
+++ b/t/tests/menus-script-check-ok/desc
@@ -2,6 +2,11 @@ Testname: menus-script-check-ok
Sequence: 6000
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
maintainer-script-does-not-check-for-existence-of-updatemenus
diff --git a/t/tests/menus-script-check-ok/tags b/t/tests/menus-script-check-ok/tags
index ea949ab..2ffcc0d 100644
--- a/t/tests/menus-script-check-ok/tags
+++ b/t/tests/menus-script-check-ok/tags
@@ -1,3 +1,7 @@
-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: 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: 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 1d8f970..0288a72 100644
--- a/testset/tags.binary
+++ b/testset/tags.binary
@@ -38,10 +38,8 @@ 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-installdocs usr/share/doc-base/space
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
E: binary: su-wrapper-without--c /usr/lib/menu/binary:3 sux
diff --git a/testset/tags.filenames b/testset/tags.filenames
index 87fe1d2..bc5c6a6 100644
--- a/testset/tags.filenames
+++ b/testset/tags.filenames
@@ -17,8 +17,6 @@ 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-installdocs usr/share/doc-base/filenames
-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
E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink6wrong ./file4
--
Debian package checker
Reply to: