]> git.donarmstrong.com Git - debhelper.git/commitdiff
r284: * Enhanced debconf support -- the database is now cleaned up on package
authorjoey <joey>
Wed, 29 Sep 1999 00:09:42 +0000 (00:09 +0000)
committerjoey <joey>
Wed, 29 Sep 1999 00:09:42 +0000 (00:09 +0000)
     purge.
   * Broke all debconf support off into a dh_installdebconf script. This
     seems conceptually a little cleaner.

autoscripts/postrm-debconf [new file with mode: 0644]
debian/changelog
dh_installdeb
dh_installdeb.1
dh_installdebconf [new file with mode: 0755]
dh_installdebconf.1 [new file with mode: 0644]
examples/rules
examples/rules.indep
examples/rules.multi
examples/rules.multi2

diff --git a/autoscripts/postrm-debconf b/autoscripts/postrm-debconf
new file mode 100644 (file)
index 0000000..2b79156
--- /dev/null
@@ -0,0 +1,4 @@
+if [ "$1" = purge -a -e /usr/share/debconf/confmodule.sh ]; then
+       . /usr/share/debconf/confmodule.sh
+       db_purge
+fi
index 0e96a2e3f1a1c8f1a2b00d3813a430c07f3c73e0..c5056f85373c080daa39674124e8e4f225a82259 100644 (file)
@@ -1,3 +1,12 @@
+debhelper (2.0.54) unstable; urgency=low
+
+  * Enhanced debconf support -- the database is now cleaned up on package
+    purge.
+  * Broke all debconf support off into a dh_installdebconf script. This
+    seems conceptually a little cleaner.
+
+ -- Joey Hess <joeyh@master.debian.org>  Tue, 28 Sep 1999 16:12:53 -0700
+
 debhelper (2.0.53) unstable; urgency=low
 
   * Minor changes to rules.multi2.
index fa45cd6f450118affd98b376f8d4687578370235..d3eebe762e4cc3c64e3b3b65bb0f829275a291cf 100755 (executable)
@@ -16,7 +16,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 
        # Install debian install scripts.
        # If any .debhelper files exist, add them into the scripts.
-       foreach $file (qw{postinst preinst prerm postrm config}) {
+       foreach $file (qw{postinst preinst prerm postrm}) {
                $f=pkgfile($PACKAGE,$file);
                if ($f) {
                        if (-f "debian/$EXT$file.debhelper") {
@@ -46,7 +46,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        }
 
        # Install non-executable files
-       foreach $file (qw{shlibs conffiles templates}) {
+       foreach $file (qw{shlibs conffiles}) {
                $f=pkgfile($PACKAGE,$file);
                if ($f) {
                        doit("install","-o","root","-g","root","-m",644,"-p",$f,"$TMP/DEBIAN/$file");
index d0f814879d2528d802c5a7fbdfa4d45b84a27fee..0ae456419e663b092ac413d8df5d32e78649dbf7 100644 (file)
@@ -17,8 +17,6 @@ the DEBIAN directory:
        prerm
        shlibs
        conffiles
-       config
-       templates
 .P
 (For packages other than the first binary package listed in debian/control,
 you must prefix these filenames with then name of the "package.", for example,
diff --git a/dh_installdebconf b/dh_installdebconf
new file mode 100755 (executable)
index 0000000..489db99
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/perl -w
+#
+# Integration with debconf.
+
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+       $TMP=tmpdir($PACKAGE);
+       $config=pkgfile($PACKAGE,"config");
+       $templates=pkgfile($PACKAGE,"templates");
+
+       if (! -d "$TMP/DEBIAN") {
+               doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
+       }
+
+       if ($config ne '') {
+               doit("install", "-o", "root", "-g", "root", "-m", 755, "-p",
+                    $config, "$TMP/DEBIAN/config");
+       }
+       
+       if ($templates ne '') {
+               doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
+                    $templates, "$TMP/DEBIAN/templates");
+       }
+
+       if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
+               autoscript($PACKAGE,"postrm","postrm-debconf");
+       }
+}
diff --git a/dh_installdebconf.1 b/dh_installdebconf.1
new file mode 100644 (file)
index 0000000..3249502
--- /dev/null
@@ -0,0 +1,40 @@
+.TH DH_INSTALLDEBCONF 1 "" "Debhelper Commands" "Debhelper Commands"
+.SH NAME
+dh_installdebconf \- install debconf files into package build directories
+.SH SYNOPSIS
+.B dh_installdebconf
+.I "[debhelper options] [-n]"
+.SH "DESCRIPTION"
+dh_installdebconf is a debhelper program that is responsible for installing
+files used by the debconf package into package build directories.
+.P
+It also automatically generates the postrm commands needed to 
+interface with debconf. See 
+.BR dh_installdeb (1)
+for an explanation of how this works.
+.P
+Files named debian/package.config and debian/package.templates are installed
+into the DEBIAN directory in the package build directory.
+.P
+For the first first binary package listed in the control file, you may use
+debian/config and debian/templates instead.
+.P
+Note that if you use debconf, your package probably needs to depend on it.
+.SH OPTIONS
+.TP
+.B debhelper options
+See
+.BR debhelper (1)
+for a list of options common to all debhelper commands.
+.TP
+.B \-n, \--noscripts
+Do not modify postrm script.
+.SH ENVIRONMENT
+See
+.BR debhelper (1)
+for a list of environment variables that affect all debhelper commands.
+.SH "SEE ALSO"
+.TP
+.BR debhelper (1)
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
index 926c38c6aa6f591e38f39f514949380e021c0fe8..d24c2b8ffd766ae55baa3b6c080631c419b2ff23 100755 (executable)
@@ -49,6 +49,7 @@ binary-arch: build install
 #      dh_testversion
        dh_testdir
        dh_testroot
+#      dh_installdebconf       
        dh_installdocs
        dh_installexamples
        dh_installmenu
index 55802f317c0d2334315d2835ca2944e705738885..ecda654aa12aab5db17dc673d6564ec9fb446f0a 100755 (executable)
@@ -47,6 +47,7 @@ binary-indep: build install
 #      dh_testversion
        dh_testdir
        dh_testroot
+#      dh_installdebconf
        dh_installdocs
        dh_installexamples
        dh_installmenu
index bd8aa31e84813a048bfdef849fcd7ad279765da9..c3b1bd1a19a1f37f1a5dd2284367dd27adfe1fdc 100755 (executable)
@@ -57,6 +57,7 @@ binary-indep: build install
        dh_testversion 1.1.17
        dh_testdir
        dh_testroot
+#      dh_installdebconf
        dh_installdocs
        dh_installexamples
        dh_installmenu
@@ -87,6 +88,7 @@ binary-arch: build install
        dh_testversion 1.1.17
        dh_testdir
        dh_testroot
+#      dh_installdebconf
        dh_installdocs
        dh_installexamples
        dh_installmenu
index 803c9ecfe8a7fccc0e2a836dc1641ff2c80efc3a..871c41c7efcdf3d7f90069bd6ac8077d273326d3 100755 (executable)
@@ -56,6 +56,7 @@ binary-common:
        dh_testversion 1.1.17
        dh_testdir
        dh_testroot
+#      dh_installdebconf
        dh_installdocs
        dh_installexamples
        dh_installmenu