[SCM] Debian package checker branch, master, updated. 45af6c4acd2b862b4248675ab42ec4d0dcb35be8
The following commit has been merged in the master branch:
commit 45af6c4acd2b862b4248675ab42ec4d0dcb35be8
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Tue Jun 24 22:41:05 2008 +0100
Check info files are removed and allow install-info --remove-exactly
Allow install-info --remove-exactly as well as --remove and flag packages
installing info files in postinst but not removing them in prerm
diff --git a/checks/infofiles b/checks/infofiles
index 6239be5..2be4b22 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -159,6 +159,13 @@ for my $file (keys %missing_section) {
unless ($postinst{'calls-install-info-section'});
}
+# Ideally we'd check whether all documents installed are removed,
+# but for now we assume that if any are removed then they all are
+if ($postinst{'calls-install-info'}) {
+ tag "info-documents-not-removed", ""
+ unless ($prerm{'calls-install-info-remove'});
+}
+
}
# -----------------------------------
@@ -210,7 +217,7 @@ sub check_script {
$pres->{'calls-install-info-quiet'} = 1;
} elsif ($piece eq '--section') {
$pres->{'calls-install-info-section'} = 1;
- } elsif ($piece eq '--remove') {
+ } elsif ($piece eq '--remove' or $piece eq '--remove-exactly') {
$pres->{'calls-install-info-remove'} = 1;
}
}
diff --git a/checks/infofiles.desc b/checks/infofiles.desc
index 46cf8ab..68b2740 100644
--- a/checks/infofiles.desc
+++ b/checks/infofiles.desc
@@ -64,3 +64,10 @@ Ref: policy 3.10
Info: The package installation scripts should avoid producing output which it
is unnecessary for the user to see. Policy specifically mentions install-info
output as unnecessary.
+
+Tag: info-documents-not-removed
+Type: error
+Ref: policy 12.2
+Info: The preinst script calls the <tt>install-info</tt> command, but the
+ documents installed are not then removed by the <tt>postinst</tt> maintainer
+ script.
diff --git a/debian/changelog b/debian/changelog
index 80c7649..0a580be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,11 @@ lintian (1.24.2) unstable; urgency=low
non-obsolete alternatives specified and if the obsolete
package is not listed first. Issue an info tag for them
though. Patch by Adam D. Barratt. (Closes: #486145)
+ * checks/infofiles{,.desc}:
+ + [ADB] Warn if the package's postinst installs info directory entries
+ but the prerm doesn't remove them. (Closes: #182512)
+ + [ADB] Treat --remove-exactly as indicating removal of an info directory
+ entry as well as --remove.
* checks/menus:
+ [ADB] Check that menu-method files include menu.h (Closes: #184104)
* checks/scripts:
diff --git a/testset/tags.maintainer-scripts b/testset/tags.maintainer-scripts
index 1788ad0..7e8437a 100644
--- a/testset/tags.maintainer-scripts
+++ b/testset/tags.maintainer-scripts
@@ -5,6 +5,7 @@ E: maintainer-scripts: control-file-has-bad-permissions config 0644 != 0755
E: maintainer-scripts: debconf-config-not-executable
E: maintainer-scripts: debian-changelog-file-contains-invalid-email-address jeroen@mordor
E: maintainer-scripts: forbidden-config-interpreter #!/usr/bin/python
+E: maintainer-scripts: info-documents-not-removed
E: maintainer-scripts: init.d-script-not-included-in-package /etc/init.d/foo
E: maintainer-scripts: install-sgmlcatalog-deprecated postinst:98
E: maintainer-scripts: install-sgmlcatalog-deprecated postrm:46
--
Debian package checker
Reply to: