Debian Bug report logs - #320201
debconf: should fallback to teletype frontend if TERM does not have correct value

version graph

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

Reported by: Eugeniy Meshcheryakov <[email protected]>

Date: Wed, 27 Jul 2005 18:50:22 UTC

Severity: normal

Found in version debconf/1.4.52

Reply or subscribe to this bug.

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


Report forwarded to [email protected], Joey Hess <[email protected]>:
Bug#320201; Package debconf. (full text, mbox, link).


Acknowledgement sent to Eugeniy Meshcheryakov <[email protected]>:
New Bug report received and forwarded. Copy sent to Joey Hess <[email protected]>. (full text, mbox, link).


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

From: Eugeniy Meshcheryakov <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: debconf: should fallback to teletype frontend if TERM does not have correct value
Date: Wed, 27 Jul 2005 18:32:34 +0300
Package: debconf
Version: 1.4.52
Severity: normal

Currently if TERM variable have value that whiptail does not understand
installation of packages fails (real example is installation of
libpango1.0-common package via ssh using mlterm terminal emulator
(TERM=mlterm) when only one host have mlterm installed):

# TERM=dfdfsdsd dpkg-reconfigure libpango1.0-common
Cleaning up font configuration of pango...
Cleaning up category xfont..
Unknown terminal: dfdfsdsd
Check the TERM environment variable.
Also make sure that the terminal is defined in the terminfo database.
Alternatively, set the TERMCAP environment variable to the desired
termcap entry.
debconf: whiptail output to the above errors, giving up!

It will be better to use teletype frontend in such situations.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.1
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)

Versions of packages debconf depends on:
ii  debconf-i18n                  1.4.52     full internationalization support 
ii  perl-base                     5.8.7-4    The Pathologically Eclectic Rubbis

Versions of packages debconf recommends:
ii  apt-utils                     0.6.38     APT utility programs

-- debconf information:
* debconf/priority: medium
* debconf/frontend: Dialog



Information forwarded to [email protected]:
Bug#320201; Package debconf. (full text, mbox, link).


Acknowledgement sent to Joey Hess <[email protected]>:
Extra info received and forwarded to list. (full text, mbox, link).


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

From: Joey Hess <[email protected]>
To: Eugeniy Meshcheryakov <[email protected]>, [email protected]
Subject: Re: Bug#320201: debconf: should fallback to teletype frontend if TERM does not have correct value
Date: Fri, 29 Jul 2005 19:40:17 -0400
[Message part 1 (text/plain, inline)]
Eugeniy Meshcheryakov wrote:
> Currently if TERM variable have value that whiptail does not understand
> installation of packages fails (real example is installation of
> libpango1.0-common package via ssh using mlterm terminal emulator
> (TERM=mlterm) when only one host have mlterm installed):
> 
> # TERM=dfdfsdsd dpkg-reconfigure libpango1.0-common
> Cleaning up font configuration of pango...
> Cleaning up category xfont..
> Unknown terminal: dfdfsdsd
> Check the TERM environment variable.
> Also make sure that the terminal is defined in the terminfo database.
> Alternatively, set the TERMCAP environment variable to the desired
> termcap entry.
> debconf: whiptail output to the above errors, giving up!
> 
> It will be better to use teletype frontend in such situations.

Any idea of a good way to check for this? Note that it would need to
work using only the packages in base.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected], Joey Hess <[email protected]>:
Bug#320201; Package debconf. (full text, mbox, link).


Acknowledgement sent to Eugeniy Meshcheryakov <[email protected]>:
Extra info received and forwarded to list. Copy sent to Joey Hess <[email protected]>. (full text, mbox, link).


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

From: Eugeniy Meshcheryakov <[email protected]>
To: Joey Hess <[email protected]>
Cc: [email protected]
Subject: Re: Bug#320201: debconf: should fallback to teletype frontend if TERM does not have correct value
Date: Sat, 30 Jul 2005 12:39:10 +0300
[Message part 1 (text/plain, inline)]
29 липня 2005 о 19:40 -0400 Joey Hess написав(-ла):
> 
> Any idea of a good way to check for this? Note that it would need to
> work using only the packages in base.
> 

This should work (tput is from ncurses-bin):

if tput init > /dev/null 2>&1; then
 echo "Run dialog frontend"
else
 echo "Run teletype frontend"
fi

Examples:

$ TERM=linux tput init > /dev/null 2>&1; echo $?
0
$ TERM=cvgfdvfdbrt tput init > /dev/null 2>&1; echo $?
3

-- 
Eugeniy Meshcheryakov

Kyiv National Taras Shevchenko University
Information and Computing Centre
http://icc.univ.kiev.ua
[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected]:
Bug#320201; Package debconf. (full text, mbox, link).


Acknowledgement sent to Joey Hess <[email protected]>:
Extra info received and forwarded to list. (full text, mbox, link).


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

From: Joey Hess <[email protected]>
To: Eugeniy Meshcheryakov <[email protected]>
Cc: [email protected]
Subject: Re: Bug#320201: debconf: should fallback to teletype frontend if TERM does not have correct value
Date: Mon, 1 Aug 2005 17:00:26 -0400
[Message part 1 (text/plain, inline)]
Eugeniy Meshcheryakov wrote:
> 29 липня 2005 о 19:40 -0400 Joey Hess написав(-ла):
> > 
> > Any idea of a good way to check for this? Note that it would need to
> > work using only the packages in base.
> > 
> 
> This should work (tput is from ncurses-bin):
> 
> if tput init > /dev/null 2>&1; then
>  echo "Run dialog frontend"
> else
>  echo "Run teletype frontend"
> fi
> 
> Examples:
> 
> $ TERM=linux tput init > /dev/null 2>&1; echo $?
> 0
> $ TERM=cvgfdvfdbrt tput init > /dev/null 2>&1; echo $?
> 3

Thanks, that looks fine, even the priorities allow it. I do need to
decide if it's worth adding a dependency on ncurses-bin just to test for
this edge case.

-- 
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:32:20 2025; Machine Name: bembo

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.