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

2005-08-01 Thread Joey Hess
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 21; then
  echo Run dialog frontend
 else
  echo Run teletype frontend
 fi
 
 Examples:
 
 $ TERM=linux tput init  /dev/null 21; echo $?
 0
 $ TERM=cvgfdvfdbrt tput init  /dev/null 21; 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
Description: Digital signature


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

2005-07-30 Thread Eugeniy Meshcheryakov
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 21; then
 echo Run dialog frontend
else
 echo Run teletype frontend
fi

Examples:

$ TERM=linux tput init  /dev/null 21; echo $?
0
$ TERM=cvgfdvfdbrt tput init  /dev/null 21; echo $?
3

-- 
Eugeniy Meshcheryakov

Kyiv National Taras Shevchenko University
Information and Computing Centre
http://icc.univ.kiev.ua


signature.asc
Description: Digital signature


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

2005-07-29 Thread Joey Hess
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
Description: Digital signature