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