[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.10-96-g2703ca8



The following commit has been merged in the master branch:
commit 2703ca8bc38851172848c1119118f0071e25638d
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Jul 25 10:56:06 2012 +0200

    t: Add debconf maintscript scripts
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/t/COVERAGE b/t/COVERAGE
index 26c369c..92d4f67 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,5 +1,5 @@
-Last generated 2012-07-24
-Coverage (Tags): 869/962 (90.33%), w. legacy tests: 944/962 (98.13%)
+Last generated 2012-07-25
+Coverage (Tags): 874/962 (90.85%), w. legacy tests: 944/962 (98.13%)
 Coverage (Checks): 32/41 (78.05%), w. legacy tests: 35/41 (85.37%)
 
 The following tags are not tested by the test suite:
@@ -36,13 +36,8 @@ binaries debug-file-should-use-detached-symbols
 binaries statically-linked-binary
 binaries unstripped-binary-or-object
 
-debconf loads-obsolete-confmodule
 debconf missing-debconf-dependency
-debconf missing-debconf-dependency-for-preinst
 debconf no-debconf-templates
-debconf postinst-does-not-load-confmodule
-debconf postinst-uses-db-input
-debconf postrm-does-not-purge-debconf
 debconf template-uses-unsplit-choices
 
 files desktop-file-in-wrong-dir
@@ -151,12 +146,8 @@ binary
   unstripped-binary-or-object
 
 debconf
-  loads-obsolete-confmodule
   missing-debconf-dependency
-  missing-debconf-dependency-for-preinst
   newer-debconf-templates
-  postinst-uses-db-input
-  postrm-does-not-purge-debconf
   template-uses-unsplit-choices
   udeb-postinst-must-not-call-ldconfig
   unknown-encoding-in-po-file
@@ -194,7 +185,6 @@ maintainer-scripts
   maintainer-script-removes-device-files
   no-debconf-templates
   output-of-updaterc.d-not-redirected-to-dev-null
-  postinst-does-not-load-confmodule
   postrm-contains-additional-updaterc.d-calls
   postrm-does-not-call-updaterc.d-for-init.d-script
   preinst-calls-updaterc.d
diff --git a/t/tests/debconf-templates-general/debian/debian/postinst b/t/tests/debconf-maintscripts-deps/debian/debian/config
similarity index 62%
copy from t/tests/debconf-templates-general/debian/debian/postinst
copy to t/tests/debconf-maintscripts-deps/debian/debian/config
index 4d6cb4d..9659eb3 100644
--- a/t/tests/debconf-templates-general/debian/debian/postinst
+++ b/t/tests/debconf-maintscripts-deps/debian/debian/config
@@ -2,7 +2,8 @@
 
 set -e
 
-#DEBHELPER#
-
 . /usr/share/debconf/confmodule
 
+db_get debconf/translated
+db_go
+
diff --git a/t/tests/debconf-config-general/debian/debian/po/POTFILES.in b/t/tests/debconf-maintscripts-deps/debian/debian/po/POTFILES.in
similarity index 100%
copy from t/tests/debconf-config-general/debian/debian/po/POTFILES.in
copy to t/tests/debconf-maintscripts-deps/debian/debian/po/POTFILES.in
diff --git a/t/tests/debconf-config-general/debian/debian/po/da.po b/t/tests/debconf-maintscripts-deps/debian/debian/po/da.po
similarity index 100%
copy from t/tests/debconf-config-general/debian/debian/po/da.po
copy to t/tests/debconf-maintscripts-deps/debian/debian/po/da.po
diff --git a/t/tests/debconf-config-general/debian/debian/po/templates.pot b/t/tests/debconf-maintscripts-deps/debian/debian/po/templates.pot
similarity index 100%
copy from t/tests/debconf-config-general/debian/debian/po/templates.pot
copy to t/tests/debconf-maintscripts-deps/debian/debian/po/templates.pot
diff --git a/t/tests/debconf-maintscripts-deps/debian/debian/postinst b/t/tests/debconf-maintscripts-deps/debian/debian/postinst
new file mode 100644
index 0000000..df9df64
--- /dev/null
+++ b/t/tests/debconf-maintscripts-deps/debian/debian/postinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+db_input low debconf/translated
+db_go
+
+
diff --git a/t/tests/debconf-maintscripts-deps/debian/debian/postrm b/t/tests/debconf-maintscripts-deps/debian/debian/postrm
new file mode 100644
index 0000000..5169df8
--- /dev/null
+++ b/t/tests/debconf-maintscripts-deps/debian/debian/postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ -f  /usr/share/debconf/confmodule.sh ] ; then
+    . /usr/share/debconf/confmodule.sh
+    # no debconf purging
+fi
diff --git a/testset/debconf/debian/debconf-test-postinst.postinst b/t/tests/debconf-maintscripts-deps/debian/debian/preinst
similarity index 61%
copy from testset/debconf/debian/debconf-test-postinst.postinst
copy to t/tests/debconf-maintscripts-deps/debian/debian/preinst
index 56ab8712..8d41696 100644
--- a/testset/debconf/debian/debconf-test-postinst.postinst
+++ b/t/tests/debconf-maintscripts-deps/debian/debian/preinst
@@ -1,10 +1,11 @@
 #!/bin/sh
+
 set -e
 
 . /usr/share/debconf/confmodule
 
-db_input medium debconf/test
+db_get debconf/translated || true
+db_go
 
 #DEBHELPER#
 
-true
diff --git a/t/tests/debconf-maintscripts-deps/debian/debian/rules b/t/tests/debconf-maintscripts-deps/debian/debian/rules
new file mode 100644
index 0000000..c51bdaa
--- /dev/null
+++ b/t/tests/debconf-maintscripts-deps/debian/debian/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+
+PKG=debian/$(shell dh_listpackages)
+
+%:
+	dh $@
+
+override_dh_builddeb:
+	# Manually copy the scripts - otherwise debhelper with insert
+	# the "correct magic" in each of them.
+	cp -a debian/preinst debian/postinst debian/postrm "$(PKG)/DEBIAN"
+	chmod 0755 "$(PKG)/DEBIAN/preinst" "$(PKG)/DEBIAN/postinst" \
+		   "$(PKG)/DEBIAN/postrm"
+	dh_builddeb
diff --git a/t/tests/debconf-maintscripts-deps/debian/debian/templates b/t/tests/debconf-maintscripts-deps/debian/debian/templates
new file mode 100644
index 0000000..a45cfa3
--- /dev/null
+++ b/t/tests/debconf-maintscripts-deps/debian/debian/templates
@@ -0,0 +1,4 @@
+Template: debconf/translated
+Type: error
+_Description: Useless note
+
diff --git a/t/tests/debconf-maintscripts-deps/desc b/t/tests/debconf-maintscripts-deps/desc
new file mode 100644
index 0000000..db7195a
--- /dev/null
+++ b/t/tests/debconf-maintscripts-deps/desc
@@ -0,0 +1,10 @@
+Testname: debconf-maintscripts-deps
+Sequence: 6000
+Version: 1.0
+Description: Test for various debconf maintscripts and dep issues
+Test-For:
+ loads-obsolete-confmodule
+ missing-debconf-dependency-for-preinst
+ postinst-does-not-load-confmodule
+ postinst-uses-db-input
+ postrm-does-not-purge-debconf
diff --git a/t/tests/debconf-maintscripts-deps/tags b/t/tests/debconf-maintscripts-deps/tags
new file mode 100644
index 0000000..57939eb
--- /dev/null
+++ b/t/tests/debconf-maintscripts-deps/tags
@@ -0,0 +1,5 @@
+W: debconf-maintscripts-deps: loads-obsolete-confmodule postrm:7 /usr/share/debconf/confmodule.sh
+W: debconf-maintscripts-deps: missing-debconf-dependency-for-preinst
+W: debconf-maintscripts-deps: postinst-does-not-load-confmodule
+W: debconf-maintscripts-deps: postinst-uses-db-input
+W: debconf-maintscripts-deps: postrm-does-not-purge-debconf

-- 
Debian package checker


Reply to: