Hello,
I had a look on it during Debian BSP in Paris.

Problem is located into ola-rdm-test.postinst script:
- It uses debconf, for variable ola-rdm-tests/daemon, without providing
any template file
- It uses db_get and never db_input, thus ola-rdm-tests/daemon is never set
- debconf is not mentioned as dependency

Please find attached a patch which removes debconf usage from postinst
script.

Regards,
Jean Baptiste
diff -Nru ola-0.9.1/debian/changelog ola-0.9.1/debian/changelog
--- ola-0.9.1/debian/changelog	2014-08-17 10:07:29.000000000 +0200
+++ ola-0.9.1/debian/changelog	2014-11-16 17:45:07.000000000 +0100
@@ -1,3 +1,10 @@
+ola (0.9.1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Remove debconf calls from postinst. (Closes: #767676)
+
+ -- Jean Baptiste Favre <deb...@jbfavre.org>  Sun, 16 Nov 2014 17:44:18 +0100
+
 ola (0.9.1-1) unstable; urgency=low
 
   * New upstream release
diff -Nru ola-0.9.1/debian/ola-rdm-tests.postinst ola-0.9.1/debian/ola-rdm-tests.postinst
--- ola-0.9.1/debian/ola-rdm-tests.postinst	2014-04-21 08:19:26.000000000 +0200
+++ ola-0.9.1/debian/ola-rdm-tests.postinst	2014-11-16 17:44:14.000000000 +0100
@@ -3,34 +3,12 @@
 
 conffile="/etc/default/ola-rdm-tests"
 
-update_config_file() {
-  db_field=$1
-  config_field=$2
-
-  RET=false
-  db_get $db_field
-  if [ -n "$RET" ] ; then
-    if grep -q "^$config_field" $conffile ; then
-      # keep any admin changes, while replacing the variable content
-      sed "s/^[ ]*$config_field=\".*\"/$config_field=\"$RET\"/" < $conffile > $conffile.new && 
-      mv $conffile.new $conffile
-    else
-      echo "$config_field=\"$RET\"" >> $conffile
-    fi
-  fi
-}
-
-# Source debconf library -- we have a Depends line
-# to make sure it is there...
-. /usr/share/debconf/confmodule
-db_version 2.0
-
 case "$1" in
   configure)
-  if [ -f $conffile ] ; then
-    sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile
-  else
-    cat << EOF > $conffile
+    if [ -f $conffile ] ; then
+      sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile
+    else
+      cat << EOF > $conffile
 # Defaults for ola-rdm-tests initscript (/etc/init.d/ola-rdm-tests)
 # This is a POSIX shell fragment
 
@@ -39,11 +17,7 @@
 # ola-rdm-tests daemon switch. If set to true, rdm_test_server.py will run.
 RUN_DAEMON="true"
 EOF
-  fi
-
-  update_config_file ola-rdm-tests/daemon RUN_DAEMON
-
-  db_stop
+    fi
   ;;
 
   abort-upgrade|abort-remove|abort-deconfigure)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to