Debconf : Patch for running cdebconf
Hi folks,
Life is a bit hectic at the moment, but I'm still working on getting
cdebconf forward.
Attached is a patch that would help a bit with the transition, as it
makes dpkg-reconfigure and dpkg-preconfigure call their cdebconf version
if DEBCONF_USE_CDEBCONF is set. Applying the patch should be harmless
unless users actually want to test using cdebconf instead of the perl
version, which I wouldn't recommend, as it require a fair amount of
manual intervention at the moment. More on that in another email.
Regis
>From 1bffc77b984319b26c12511c60719e6c66037246 Mon Sep 17 00:00:00 2001
From: Regis Boudin <regis@boudin.name>
Date: Tue, 12 Jul 2011 21:15:10 +0100
Subject: [PATCH] call cdebconf versions if the env variable is set
---
dpkg-preconfigure | 4 ++++
dpkg-reconfigure | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dpkg-preconfigure b/dpkg-preconfigure
index 02f3087..a996fc0 100755
--- a/dpkg-preconfigure
+++ b/dpkg-preconfigure
@@ -87,6 +87,10 @@ BEGIN {
}
}
+if (exists $ENV{DEBCONF_USE_CDEBCONF} and $ENV{DEBCONF_USE_CDEBCONF} ne '') {
+ exec "/usr/lib/cdebconf/dpkg-preconfigure", @ARGV;
+}
+
Debconf::Db->load;
my $apt=0;
diff --git a/dpkg-reconfigure b/dpkg-reconfigure
index 79dea84..e38df69 100755
--- a/dpkg-reconfigure
+++ b/dpkg-reconfigure
@@ -81,6 +81,10 @@ L<debconf(7)>
=cut
+if (exists $ENV{DEBCONF_USE_CDEBCONF} and $ENV{DEBCONF_USE_CDEBCONF} ne '') {
+ exec "/usr/lib/cdebconf/dpkg-reconfigure", @ARGV;
+}
+
my $infodir="/var/lib/dpkg/info";
use strict;
--
1.7.6
Reply to: