Skip to content

Commit

Permalink
Merge pull request #249 from aschnell/master
Browse files Browse the repository at this point in the history
- drop check for Gtk since Gtk UI of YaST is no longer supported (bsc#908607)
  • Loading branch information
aschnell committed Dec 10, 2014
2 parents 9f73b5e + bd49761 commit 1e2e02f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 51 deletions.
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Dec 10 15:57:59 CET 2014 - aschnell@suse.de

- drop check for Gtk since Gtk UI of YaST is no longer supported
(bsc#908607)
- 3.1.124

-------------------------------------------------------------------
Thu Dec 4 09:50:16 UTC 2014 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.1.123
Version: 3.1.124
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
64 changes: 15 additions & 49 deletions startup/YaST2.call
Expand Up @@ -83,7 +83,7 @@ function prepare_for_x11 () {
fi

#=============================================
# set YaST2 Qt/Gtk options for local displays
# set YaST2 Qt options for local displays
#---------------------------------------------
if [ ! -z "$NEED_XSERVER" ];then
Y2_UI_ARGS="--noborder --auto-fonts --fullscreen"
Expand All @@ -98,12 +98,6 @@ function prepare_for_qt () {
}


#----[ prepare_for_gtk ]----#
function prepare_for_gtk () {
prepare_for_x11
}


#----[ prepare_for_ncurses ]----#
function prepare_for_ncurses () {
#------------------------------------------------------
Expand Down Expand Up @@ -180,7 +174,7 @@ function prepare_for_vnc () {
#----[ check_x11 ]----#
function check_x11 () {
#------------------------------------------------------
# check if the prepared medium X11 (Qt/Gtk) is valid
# check if the prepared medium X11 (Qt) is valid
# ---
if [ ! -z "$NEED_XSERVER" ];then
if [ "$server_running" = 0 ];then
Expand Down Expand Up @@ -225,12 +219,8 @@ function check_network () {
Y2_MODE=qt
fi
if ! check_qt ; then
log "\tQt plugin check failed falling back to Gtk"
Y2_MODE=gtk
if ! check_gtk ; then
log "\tGtk plugin check failed falling back to ncurses"
Y2_MODE=ncurses
fi
log "\tQt plugin check failed falling back to ncurses"
Y2_MODE=ncurses
fi
}

Expand Down Expand Up @@ -455,32 +445,27 @@ LOG_PREFIX="Stage [call]"
# 3) Medium prequalification
#---------------------------------------------
# Check which installation mediums can be used. There are
# five mediums available: Qt(0) SSH(1), VNC(2), NCURSES(3) and Gtk(4).
# four mediums available: Qt(0) SSH(1), VNC(2), NCURSES(3).
# The following checks will create an array which contains
# the possible mediums. An index of 1 indicates "can be used"
# an index of 0 indicated "cannot be used"
# ---
MEDIUM=(1 1 1 1 1)
MEDIUM=(1 1 1 1)

#=============================================
# 3.1) prequalification checks for Qt and Gtk
# 3.1) prequalification checks for Qt and
#---------------------------------------------
log "Starting prequalification checks..."
log "==================================="
# 3.1.1) Qt and Gtk plugin check...
# 3.1.1) Qt plugin check...
if ! check_qt ; then
log "\tQt plugin check failed -> Medium Qt disabled"
MEDIUM[0]=0
fi
if ! check_gtk ; then
log "\tGtk plugin check failed -> Medium Gtk disabled"
MEDIUM[4]=0
fi
# 3.1.3) Memory check >= $MEM_NEEDED for Qt/Gtk/X11...
# 3.1.3) Memory check >= $MEM_NEEDED for Qt/X11...
if [ $MEM_TOTAL -lt "$MEM_NEEDED" ];then
log "\tMemory requirement > $MEM_NEEDED not fulfilled -> Medium Qt and Gtk disabled"
log "\tMemory requirement > $MEM_NEEDED not fulfilled -> Medium Qt disabled"
MEDIUM[0]=0
MEDIUM[4]=0
fi
# 3.1.4) Check if we need to start our own X11 server...
if [ -z "$DISPLAY" ];then
Expand All @@ -497,25 +482,22 @@ fi

# 3.1.6) Check for WindowManager configuration
if [ ! -f /etc/icewm/preferences.yast2 ];then
log "\tNo Windowmanager configuration found -> Medium Qt and Gtk disabled"
log "\tNo Windowmanager configuration found -> Medium Qt disabled"
MEDIUM[0]=0
MEDIUM[4]=0
fi
# 3.1.7) Check for remote display usage
if [ ! -z $Display_IP ];then
log "\tRemote Display usage -> Medium Qt and Gtk enabled"
log "\tRemote Display usage -> Medium Qt enabled"
log "\tExporting DISPLAY to host: $Display_IP:0.0"
export DISPLAY="$Display_IP:0.0"
NEED_XSERVER=""
MEDIUM[0]=1
MEDIUM[4]=1
fi

# 3.1.8) Check for testX binary
if [ ! -x /usr/lib/YaST2/bin/testX ] ; then
log "\tNo testX binary installed -> Medium Qt and Gtk disabled"
log "\tNo testX binary installed -> Medium Qt disabled"
MEDIUM[0]=0
MEDIUM[4]=0
fi

#=============================================
Expand Down Expand Up @@ -590,22 +572,8 @@ log "\tWished medium is: $SELECTED_MEDIUM"
case $SELECTED_MEDIUM in
QT) {
if [ ${MEDIUM[0]} -eq 0 ];then
log "\tMedium Qt not available, falling back to Gtk"
SELECTED_MEDIUM="GTK"
if [ ${MEDIUM[4]} -eq 0 ];then
log "\tMedium Gtk not available, falling back to ncurses"
SELECTED_MEDIUM="NCURSES"
fi
fi
} ;;
GTK) {
if [ ${MEDIUM[4]} -eq 0 ];then
log "\tMedium Gtk not available, falling back to Qt"
SELECTED_MEDIUM="QT"
if [ ${MEDIUM[0]} -eq 0 ];then
log "\tMedium Qt not available, falling back to ncurses"
SELECTED_MEDIUM="NCURSES"
fi
log "\tMedium Qt not available, falling back to ncurses"
SELECTED_MEDIUM="NCURSES"
fi
} ;;
SSH) {
Expand All @@ -628,7 +596,6 @@ log "\tSelected medium is: $SELECTED_MEDIUM"
#---------------------------------------------
case $SELECTED_MEDIUM in
QT) prepare_for_qt ; Y2_MODE=qt ;;
GTK) prepare_for_gtk ; Y2_MODE=gtk ;;
SSH) prepare_for_ssh ; Y2_MODE=ncurses ;;
VNC) prepare_for_vnc ; Y2_MODE=qt ;;
NCURSES) prepare_for_ncurses ; Y2_MODE=ncurses ;;
Expand All @@ -639,7 +606,6 @@ esac
#---------------------------------------------
case $SELECTED_MEDIUM in
QT) check_x11 ;;
GTK) check_x11 ;;
SSH) check_network ;;
VNC) check_vnc ;;
esac
Expand Down
2 changes: 1 addition & 1 deletion startup/doc/install.tex
@@ -1,7 +1,7 @@
\chapter{Possible installation methods}

\begin{itemize}
\item \textbf{\underline{Standard X11 based, UI:Qt or UI:Gtk}}\\
\item \textbf{\underline{Standard X11 based, UI:Qt}}\\
Insert bootable CD and simply start the installation without
any options set.
\item \textbf{\underline{Textmode with fbdev active, UI:ncurses}}\\
Expand Down

0 comments on commit 1e2e02f

Please sign in to comment.