lintian: r1364 - in trunk: checks debian testset testset/debconf/debian
Author: rra
Date: 2008-06-07 11:21:50 +0200 (Sat, 07 Jun 2008)
New Revision: 1364
Added:
trunk/testset/debconf/debian/debconf-test-postinst.postinst
trunk/testset/debconf/debian/debconf-test-postinst.postrm
trunk/testset/debconf/debian/debconf-test-postinst.templates
Modified:
trunk/checks/debconf
trunk/debian/changelog
trunk/testset/debconf/debian/control
trunk/testset/debconf/debian/rules
trunk/testset/tags.debconf
Log:
* checks/debconf:
+ [RA] Don't warn about using db_input in postinst if a config script
also exists and uses db_input. The package maintainer probably
knows what they're doing.
Modified: trunk/checks/debconf
===================================================================
--- trunk/checks/debconf 2008-06-07 09:00:44 UTC (rev 1363)
+++ trunk/checks/debconf 2008-06-07 09:21:50 UTC (rev 1364)
@@ -330,6 +330,7 @@
# Check the maintainer scripts.
+my $config_calls_db_input;
for my $file (qw(config postinst)) {
my $potential_makedev = {};
if (open(IN, '<', "control/$file")) {
@@ -354,18 +355,22 @@
last unless $next;
$_ .= $next;
}
- if (m#(?:\.|source)\s+/usr/share/debconf/confmodule# ||
+ if (m,(?:\.|source)\s+/usr/share/debconf/confmodule, ||
m/(use|require)\s+Debconf::Client::ConfModule/) {
$usesconfmodule=1;
}
if (not $obsoleteconfmodule and
- m#(/usr/share/debconf/confmodule\.sh|
- Debian::DebConf::Client::ConfModule)#x) {
+ m,(/usr/share/debconf/confmodule\.sh|
+ Debian::DebConf::Client::ConfModule),x) {
tag "$file-loads-obsolete-confmodule", "$1";
$usesconfmodule=1;
$obsoleteconfmodule=1;
}
- if ($file eq 'postinst' and not $db_input and m/db_input/) {
+ if ($file eq 'config' and m/db_input/) {
+ $config_calls_db_input = 1;
+ }
+ if ($file eq 'postinst' and not $db_input and m/db_input/
+ and not $config_calls_db_input) {
# TODO: Perl?
tag "postinst-uses-db-input", ""
unless $type eq 'udeb';
@@ -492,4 +497,8 @@
1;
+# Local Variables:
+# indent-tabs-mode: t
+# cperl-indent-level: 4
+# End:
# vim: syntax=perl ts=8
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-06-07 09:00:44 UTC (rev 1363)
+++ trunk/debian/changelog 2008-06-07 09:21:50 UTC (rev 1364)
@@ -23,6 +23,10 @@
have no *.diff.gz. Thanks, Raphael Hertzog. (Closes: #483384)
+ [RA] Use the new Lintian::Collect interface to check whether a
package is native.
+ * checks/debconf:
+ + [RA] Don't warn about using db_input in postinst if a config script
+ also exists and uses db_input. The package maintainer probably
+ knows what they're doing.
* checks/fields:
+ [RA] Syntax-check Breaks like other relationship fields. Warn if
any packages use Breaks for right now. Only check for duplicate
Modified: trunk/testset/debconf/debian/control
===================================================================
--- trunk/testset/debconf/debian/control 2008-06-07 09:00:44 UTC (rev 1363)
+++ trunk/testset/debconf/debian/control 2008-06-07 09:21:50 UTC (rev 1364)
@@ -22,6 +22,12 @@
Description: Test package for the debconf checks of lintian
Package uses debconf only in preinst
+Package: debconf-test-postinst
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Test package for the debconf checks of lintian
+ Package uses debconf only in postinst
+
Package: debconf-udeb
Section: debian-installer
XC-Package-Type: udeb
Copied: trunk/testset/debconf/debian/debconf-test-postinst.postinst (from rev 1343, trunk/testset/debconf/debian/debconf-test-preinst.preinst)
===================================================================
--- trunk/testset/debconf/debian/debconf-test-postinst.postinst (rev 0)
+++ trunk/testset/debconf/debian/debconf-test-postinst.postinst 2008-06-07 09:21:50 UTC (rev 1364)
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_input medium debconf/test
+
+#DEBHELPER#
+
+true
Copied: trunk/testset/debconf/debian/debconf-test-postinst.postrm (from rev 1343, trunk/testset/debconf/debian/debconf-test-preinst.postrm)
===================================================================
--- trunk/testset/debconf/debian/debconf-test-postinst.postrm (rev 0)
+++ trunk/testset/debconf/debian/debconf-test-postinst.postrm 2008-06-07 09:21:50 UTC (rev 1364)
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+fi
+#DEBHELPER#
Copied: trunk/testset/debconf/debian/debconf-test-postinst.templates (from rev 1343, trunk/testset/debconf/debian/debconf-test-preinst.templates)
===================================================================
--- trunk/testset/debconf/debian/debconf-test-postinst.templates (rev 0)
+++ trunk/testset/debconf/debian/debconf-test-postinst.templates 2008-06-07 09:21:50 UTC (rev 1364)
@@ -0,0 +1,3 @@
+Template: debconf/test
+Type: text
+_description: Enter something:
Modified: trunk/testset/debconf/debian/rules
===================================================================
--- trunk/testset/debconf/debian/rules 2008-06-07 09:00:44 UTC (rev 1363)
+++ trunk/testset/debconf/debian/rules 2008-06-07 09:21:50 UTC (rev 1364)
@@ -33,6 +33,7 @@
dh_installdebconf -pdebconf-test
dh_installdebconf -pdebconf-test-noscripts --noscripts
dh_installdebconf -pdebconf-test-preinst --noscripts
+ dh_installdebconf -pdebconf-test-postinst --noscripts
dh_installdebconf -pdebconf-udeb
# Not needed, but it tests dh_python build dependencies.
Modified: trunk/testset/tags.debconf
===================================================================
--- trunk/testset/tags.debconf 2008-06-07 09:00:44 UTC (rev 1363)
+++ trunk/testset/tags.debconf 2008-06-07 09:21:50 UTC (rev 1364)
@@ -10,8 +10,8 @@
I: debconf source: package-needs-python-policy-debhelper
I: debconf-test: debconf-error-requires-versioned-depends debconf/error
W: debconf source: ancient-standards-version 3.7.2 (current is 3.8.0)
-W: debconf source: debian-rules-calls-debhelper-in-odd-order dh_makeshlibs (line 48)
-W: debconf source: debian-rules-calls-debhelper-in-odd-order dh_makeshlibs (line 52)
+W: debconf source: debian-rules-calls-debhelper-in-odd-order dh_makeshlibs (line 49)
+W: debconf source: debian-rules-calls-debhelper-in-odd-order dh_makeshlibs (line 53)
W: debconf source: debian-rules-sets-DH_COMPAT line 3
W: debconf source: dpatch-build-dep-but-no-patch-list debconf
W: debconf source: invalid-po-file debian/po/fr.po
@@ -28,6 +28,11 @@
W: debconf-test-noscripts: no-debconf-config
W: debconf-test-noscripts: old-fsf-address-in-copyright-file
W: debconf-test-noscripts: postrm-does-not-purge-debconf
+W: debconf-test-postinst: copyright-contains-dh_make-todo-boilerplate
+W: debconf-test-postinst: no-debconf-config
+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: missing-debconf-dependency-for-preinst
W: debconf-test-preinst: old-fsf-address-in-copyright-file
@@ -40,7 +45,6 @@
W: debconf-test: old-fsf-address-in-copyright-file
W: debconf-test: possible-debconf-note-abuse config:19 debconf/test
W: debconf-test: possible-debconf-note-abuse postinst:8 debconf/test
-W: debconf-test: postinst-uses-db-input
W: debconf-test: select-with-boolean-choices debconf/should-be-boolean
W: debconf-test: too-long-extended-description-in-templates debconf/teststring
W: debconf-test: too-long-short-description-in-templates debconf/testnote
Reply to: