[SCM] Debian package checker branch, master, updated. 7bdebaa97f61aeaca814f0c5a24d7e4f4112e6d7
The following commit has been merged in the master branch:
commit 7bdebaa97f61aeaca814f0c5a24d7e4f4112e6d7
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Sun Jul 6 21:19:04 2008 +0100
Replace {config,postinst}-loads-obsolete-confmodule with a generic loads-obsolete-confmodule tag
+ [ADB] Replace the {config,postinst}-loads-obsolete-confmodule tags
with a new loads-obsolete-confmodule test which is used for all
maintainer scripts and outputs the script name as part of its extra data.
diff --git a/checks/debconf b/checks/debconf
index 6eca3ce..a6fd769 100644
--- a/checks/debconf
+++ b/checks/debconf
@@ -400,11 +400,10 @@ for my $file (qw(config prerm postrm preinst postinst)) {
m/(use|require)\s+Debconf::Client::ConfModule/) {
$usesconfmodule=1;
}
- if (($file eq 'postinst' or $file eq 'config') and
- not $obsoleteconfmodule and
+ if (not $obsoleteconfmodule and
m,(/usr/share/debconf/confmodule\.sh|
Debian::DebConf::Client::ConfModule),x) {
- tag "$file-loads-obsolete-confmodule", "$1";
+ tag "loads-obsolete-confmodule", "$file:$. $1";
$usesconfmodule=1;
$obsoleteconfmodule=1;
}
diff --git a/checks/debconf.desc b/checks/debconf.desc
index 9cdbae0..070dd29 100644
--- a/checks/debconf.desc
+++ b/checks/debconf.desc
@@ -91,12 +91,6 @@ Tag: config-does-not-load-confmodule
Type: warning
Info: The config script must load one of the debconf libraries.
-Tag: config-loads-obsolete-confmodule
-Type: warning
-Info: The config script uses an obsolete name for a debconf confmodule.
- Shell scripts should source <tt>/usr/share/debconf/confmodule</tt>, while
- Perl scripts should use <tt>Debconf::Client::ConfModule</tt>.
-
Tag: postinst-uses-db-input
Type: warning
Info: It is generally not a good idea for postinst scripts to use debconf
@@ -110,9 +104,9 @@ Info: Even if your postinst does not involve debconf, you currently need to
make sure it loads one of the debconf libraries. This will be changed in
the future.
-Tag: postinst-loads-obsolete-confmodule
+Tag: loads-obsolete-confmodule
Type: warning
-Info: The postinst script uses an obsolete name for a debconf confmodule.
+Info: The maintainer script uses an obsolete name for a debconf confmodule.
Shell scripts should source <tt>/usr/share/debconf/confmodule</tt>, while
Perl scripts should use <tt>Debconf::Client::ConfModule</tt>.
diff --git a/debian/changelog b/debian/changelog
index 19cd522..3cd21e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,9 @@ lintian (1.24.2) unstable; urgency=low
+ [ADB] Check all maintainer scripts for issues, rather than just config
and postinst.
+ [ADB] Detect debconf templates which appear to be unused.
+ + [ADB] Replace the {config,postinst}-loads-obsolete-confmodule tags
+ with a new loads-obsolete-confmodule test which is used for all
+ maintainer scripts and outputs the script name as part of its extra data.
* checks/description{,.desc}:
+ [RA] Warn about duplicated words in the description. Patch from
Raphael Geissert. (Closes: #424746)
diff --git a/testset/debconf/debian/debconf-test-preinst.preinst b/testset/debconf/debian/debconf-test-preinst.preinst
index 56ab871..bf6f074 100644
--- a/testset/debconf/debian/debconf-test-preinst.preinst
+++ b/testset/debconf/debian/debconf-test-preinst.preinst
@@ -1,6 +1,9 @@
#!/bin/sh
set -e
+# Obsolete name for the confmodule
+. /usr/share/debconf/confmodule.sh
+
. /usr/share/debconf/confmodule
db_input medium debconf/test
diff --git a/testset/tags.debconf b/testset/tags.debconf
index d033d0b..5ef84a2 100644
--- a/testset/tags.debconf
+++ b/testset/tags.debconf
@@ -49,9 +49,10 @@ W: debconf-test-postinst: old-fsf-address-in-copyright-file
W: debconf-test-postinst: possible-debconf-note-abuse postinst:6 debconf/test
W: debconf-test-postinst: postinst-uses-db-input
W: debconf-test-preinst: copyright-contains-dh_make-todo-boilerplate
+W: debconf-test-preinst: loads-obsolete-confmodule preinst:5 /usr/share/debconf/confmodule.sh
W: debconf-test-preinst: missing-debconf-dependency-for-preinst
W: debconf-test-preinst: old-fsf-address-in-copyright-file
-W: debconf-test-preinst: possible-debconf-note-abuse preinst:6 debconf/test
+W: debconf-test-preinst: possible-debconf-note-abuse preinst:9 debconf/test
W: debconf-test: copyright-contains-dh_make-todo-boilerplate
W: debconf-test: making-assumptions-about-interfaces-in-templates debconf/testboolean
W: debconf-test: malformed-prompt-in-templates debconf/teststring
--
Debian package checker
Reply to: