Skip to content

Commit

Permalink
Merge pull request #1117 from yast/huha-no-fbiterm
Browse files Browse the repository at this point in the history
Drop fbiterm in Tumbleweed Installation
  • Loading branch information
shundhammer committed May 27, 2024
2 parents 68180ad + 2efeda0 commit e896d3b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 45 deletions.
6 changes: 6 additions & 0 deletions package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 14 13:55:18 UTC 2024 - Stefan Hundhammer <shundhammer@suse.com>

- Drop fbiterm (bsc#1224053)
- 5.0.11

-------------------------------------------------------------------
Wed May 8 07:22:28 UTC 2024 - Stefan Schubert <schubi@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 5.0.10
Version: 5.0.11
Release: 0
Summary: YaST2 - Installation Parts
License: GPL-2.0-only
Expand Down
1 change: 0 additions & 1 deletion startup/AUTHOR

This file was deleted.

30 changes: 16 additions & 14 deletions startup/YaST2.call
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ function prepare_for_x11 () {


function prepare_for_qt () {
# From /usr/lib/YaST2/bin/yast2-funcs (pkg yast2.rpm)
set_inst_qt_env
prepare_for_x11
}
Expand All @@ -302,11 +303,15 @@ function prepare_for_ncurses () {
fi
fi
#=============================================
# Check for FbIterm
# Check for supported locales in NCurses
#---------------------------------------------
check_run_fbiterm
log "\tCheck for FB-I-terminal: RUN_FBITERM = $RUN_FBITERM"
log "\tChecking supported NCurses locales"
check_supported_ncurses_locales
log "\tLANG: $LANG LC_CTYPE: $LC_CTYPE"

# From /usr/lib/YaST2/bin/yast2-funcs (pkg yast2.rpm)
set_inst_ncurses_env

#=============================================================
# Disable display of status messages on the console, as
# controlled via systemd.show_status=0 on the kernel command.
Expand All @@ -325,6 +330,7 @@ function prepare_for_ssh () {
# prepare SSH installation
# ---
#
# From /usr/lib/YaST2/bin/yast2-funcs (pkg yast2.rpm)
set_inst_qt_env
}

Expand Down Expand Up @@ -362,7 +368,9 @@ function prepare_for_vnc () {
#=============================================
# Use YaST theme
#---------------------------------------------
set_inst_qt_env

# From /usr/lib/YaST2/bin/yast2-funcs (pkg yast2.rpm)
set_inst_qt_env
}


Expand Down Expand Up @@ -533,12 +541,6 @@ function start_yast () {
fi
export QT_IM_MODULE=xim

if [ "$RUN_FBITERM" = "1" ]; then
OPT_FBITERM="/usr/bin/fbiterm --"
else
OPT_FBITERM=
fi

log "\tMODULE_NAME: $Y2_MODULE_NAME"
log "\tMODE_FLAGS: $Y2_MODE_FLAGS"
log "\tMODULE_ARGS: $Y2_MODULE_ARGS"
Expand Down Expand Up @@ -571,9 +573,7 @@ function start_yast () {
fi

if [ "$Y2GDB" != "1" ]; then
$OPT_FBITERM \
"$Y2START" \
$Y2START_ARGS
"$Y2START" $Y2START_ARGS
Y2_EXIT_CODE=$?
else
GDBCMDS=/var/lib/YaST2/gdb-cmds
Expand Down Expand Up @@ -662,8 +662,10 @@ function start_yast_again () {
#=============================================
# 1) Source common script functions
#---------------------------------------------

# This sources the files at /usr/lib/YaST2/startup/common/
# as well as /usr/lib/YaST2/bin/yast2-funcs (from yast2.rpm)
. /usr/lib/YaST2/startup/common/functions.sh
. /usr/lib/YaST2/startup/common/network.sh
. /usr/lib/YaST2/startup/requires


Expand Down
43 changes: 14 additions & 29 deletions startup/common/language.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,28 @@
# DESCRIPTION : Common used functions used for the YaST2 startup process
# : refering to language environment issues
# :
# STATUS : $Id$
#----------------
#
#----[ check_run_fbiterm ]----#
function check_run_fbiterm () {

#--------------------------------------------------
# check whether the system can use fbiterm also
# handle the CJK language mangle on linux console
# set flag value in RUN_FBITERM
# Check whether the locale is supported in ncurses mode
# and fall back to en_US.UTF-8 if it is not
# ---
RUN_FBITERM=0
if test "$MEM_TOTAL" -lt "57344" ; then
return
fi
TTY=`/usr/bin/tty`
function check_supported_ncurses_locales () {
TTY=`/usr/bin/tty`
if test "$TERM" = "linux" -a \
\( "$TTY" = /dev/console -o "$TTY" != "${TTY#/dev/tty[0-9]}" \);
then
# check whether fbiterm can run on console
if test -x /usr/bin/fbiterm && \
/usr/bin/fbiterm echo >/dev/null 2>&1;
then
RUN_FBITERM=1
else
# use english
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
log "\tfbiterm is not available or it does not work in this environment"
fi
# We are no longer using fbiterm to support nontrivial locales
# (bsc#1224053), so we fall back to English if we are on the
# system console

case "$LANG" in
# These languages are not properly supported by fbiterm causing YaST to crash
# (fate#325746).
ar*|bn*|gu*|hi*|km*|mr*|pa*|ta*|th*)
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
esac
case "$LANG" in
zh*|ja*|ko*|ar*|bn*|gu*|hi*|km*|mr*|pa*|ta*|th*)
log "\tLanguage $LANG is unsupported in NCurses, falling back to en_US.UTF-8"
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
esac
fi
}

Expand Down

0 comments on commit e896d3b

Please sign in to comment.