Debian Bug report logs - #646252
Please provide a way to check if debconf is running interactive or noninteractive frontend

version graph

Package: debconf; Maintainer for debconf is Debconf Developers <[email protected]>; Source for debconf is src:debconf (PTS, buildd, popcon).

Reported by: Robert Luberda <[email protected]>

Date: Sat, 22 Oct 2011 17:57:01 UTC

Severity: wishlist

Found in version debconf/1.5.41

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debconf Developers <[email protected]>:
Bug#646252; Package debconf. (Sat, 22 Oct 2011 17:57:04 GMT) (full text, mbox, link).


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).


Message #5 received at [email protected] (full text, mbox, reply):

From: Robert Luberda <[email protected]>
To: Debian Bug Tracking System <[email protected]>
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




Information forwarded to [email protected], Debconf Developers <[email protected]>:
Bug#646252; Package debconf. (Sat, 22 Oct 2011 20:00:03 GMT) (full text, mbox, link).


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).


Message #10 received at [email protected] (full text, mbox, reply):

From: Joey Hess <[email protected]>
To: Robert Luberda <[email protected]>, [email protected]
Subject: Re: [Debconf-devel] Bug#646252: Please provide a way to check if debconf is running interactive or noninteractive frontend
Date: Sat, 22 Oct 2011 12:56:18 -0700
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Fri May 16 09:34:35 2025; Machine Name: buxtehude

Debian Bug tracking system

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/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.