Acknowledgement sent
to Robert Luberda <[email protected]>:
New Bug report received and forwarded. Copy sent to Debconf Developers <[email protected]>.
(Sat, 22 Oct 2011 17:57:04 GMT) (full text, mbox, link).
Subject: Please provide a way to check if debconf is running interactive or
noninteractive frontend
Date: Sat, 22 Oct 2011 19:54:35 +0200
Package: debconf
Version: 1.5.41
Severity: wishlist
It would be nice if it would be possible to check from maintainer
scripts if debconf is running interactively or not. I would use such a
feature to fix #645240 (run some command in background for interactive
use or spawn it in foreground/don't run at all for noninteractive).
I tried using the 'seen' flag, but I found it unreliable due to
DEBCONF_NONINTERACTIVE_SEEN.
I've also found debconf's VISIBLE command, but it is not documented, and
seems to always return 'true' regardless of the frontend.
Regards,
robert
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable'), (200, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.38-2-686 (SMP w/1 CPU core)
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/dash
Versions of packages debconf depends on:
ii perl-base 5.12.4-6
Versions of packages debconf recommends:
ii apt-utils 0.8.15.9
ii debconf-i18n 1.5.41
Versions of packages debconf suggests:
ii debconf-doc 1.5.41
ii debconf-utils 1.5.41
ii dialog 1.1-20111020-1
ii libgtk2-perl 2:1.223-1+b1
ii libnet-ldap-perl <none>
ii libqtcore4-perl <none>
ii libqtgui4-perl <none>
ii libterm-readline-gnu-perl 1.20-2
ii perl 5.12.4-6
ii whiptail 0.52.11-2.1
-- Configuration Files:
/etc/debconf.conf changed [not included]
-- debconf information excluded
Acknowledgement sent
to Joey Hess <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debconf Developers <[email protected]>.
(Sat, 22 Oct 2011 20:00:03 GMT) (full text, mbox, link).
Robert Luberda wrote:
> It would be nice if it would be possible to check from maintainer
> scripts if debconf is running interactively or not. I would use such a
> feature to fix #645240 (run some command in background for interactive
> use or spawn it in foreground/don't run at all for noninteractive).
>
> I tried using the 'seen' flag, but I found it unreliable due to
> DEBCONF_NONINTERACTIVE_SEEN.
I think one way to accomplish what you want to do is to have the value
be true in the template, and then:
if ! db_input foo/bar; then
not_seen=1
fi
db_go
db_get foo/bar
if [ "$not_seen" ] || [ "$RET" = false ]; then
foreground=1
fi
It does prevent preseeding of the question, but preseeding may not
matter.
> I've also found debconf's VISIBLE command, but it is not documented, and
> seems to always return 'true' regardless of the frontend.
It's deprecated and does nothing but check the seen flag.
--
see shy jo
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.