Mailinglist Archive: yast-commit (864 mails)

< Previous Next >
[yast-commit] r42431 - in /trunk/yast2: package/yast2.changes scripts/yast2
  • From: mvidner@xxxxxxxxxxxxxxxx
  • Date: Tue, 27 Nov 2007 12:48:02 -0000
  • Message-id: <20071127124802.9E1772807F@xxxxxxxxxxxxxxxx>
Author: mvidner
Date: Tue Nov 27 13:48:02 2007
New Revision: 42431

URL: http://svn.opensuse.org/viewcvs/yast?rev=42431&view=rev
Log:
Factored out the y2base loop. Exit it on failure (#343258).

Modified:
trunk/yast2/package/yast2.changes
trunk/yast2/scripts/yast2

Modified: trunk/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=42431&r1=42430&r2=42431&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Tue Nov 27 13:48:02 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Tue Nov 27 13:47:41 CET 2007 - mvidner@xxxxxxx
+
+- /sbni/yast2: Factored out the y2base loop. Exit it on failure (#343258).
+
+-------------------------------------------------------------------
Fri Nov 23 16:21:28 CET 2007 - mzugec@xxxxxxx

- fixed URL module for "smb" type

Modified: trunk/yast2/scripts/yast2
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/yast2?rev=42431&r1=42430&r2=42431&view=diff
==============================================================================
--- trunk/yast2/scripts/yast2 (original)
+++ trunk/yast2/scripts/yast2 Tue Nov 27 13:48:02 2007
@@ -39,6 +39,8 @@
fi
}

+exit_code=0
+
exit_trap()
{
# handily, exit_code is set to $? of y2base.
@@ -54,6 +56,7 @@
# Accumulated arguments for both the Qt UI and y2cc; currently supported:
# --fullscreen
# --noborder
+# well also for gtk and ncurses
Y2QT_ARGS=""
GNOME_SHELL="$ybindir/y2controlcenter-gnome"
KDE_SHELL="$ybindir/y2controlcenter"
@@ -347,37 +350,17 @@
fi

# this fixes launching of interactive subprocesses, #150799
- NCTHREADS=--nothreads
+ Y2QT_ARGS="$Y2QT_ARGS --nothreads"

# set color theme, if defined
if [ ! -z "$Y2NCURSES_COLOR_THEME" ]; then
export Y2NCURSES_COLOR_THEME="$Y2NCURSES_COLOR_THEME"
fi

- # use menu.ycp
- # TODO: this does not need to be a special case. refactor after release
- if [ $module == "menu" ] ; then
- while true ; do
- $ybindir/y2base menu ncurses $NCTHREADS
- exit_code=$?
- if [ ! -e "/var/lib/YaST2/restart_menu" ] ; then
- break
- fi
- done
- else
-
- while true ; do
- $ybindir/y2base "$module" "$@" ncurses $NCTHREADS
- exit_code=$?
- if [ ! $module == "online_update" -o ! -e
"/var/lib/YaST2/selected_patches.ycp" ] ; then
- break
- fi
- done
- fi
else
rpm -V yast2-core yast2-ncurses yast2-qt yast2-gtk >&2
echo "Something is wrong with the YaST user interface." >&2
- exit_code=1
+ exit_code=1 # also skips y2base later
fi
# quick hack: treat gtk like qt
elif [ "$SELECTED_GUI" = "qt" -o "$SELECTED_GUI" = "gtk" ]; then
@@ -389,12 +372,7 @@
if [ $module == "menu" ]; then
select_control_center
fi
-
- if [ $module == "menu" -a -e "$y2ccbin" ] ; then
- $y2ccbin $Y2QT_ARGS "$@"
- exit_code=$?
- else
-
+
# Special case: "sw_single" needs a lot of screen space -
# always start it in full screen mode.
#
@@ -414,18 +392,31 @@
esac
fi
fi
+else
+ echo >&2 "Internal error, unhandled '$SELECTED_GUI'"
+fi
+

- while true ; do
+# do it!
+# $@ are args for ycp
+if [ $module == "menu" -a -f "$y2ccbin" ] ; then
+ $y2ccbin $Y2QT_ARGS "$@"
+ exit_code=$?
+else
+ # loop while necessary
+ case "$module" in
+ menu) REDO_FILE=/var/lib/YaST2/restart_menu ;;
+ online_update) REDO_FILE=/var/lib/YaST2/selected_patches.ycp ;;
+ *) ;;
+ esac
+ # break out on errors, #343258
+ while [ $exit_code = 0 ]; do
$ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2QT_ARGS
exit_code=$?
-
- if [ ! $module == "online_update" -o ! -e
"/var/lib/YaST2/selected_patches.ycp" ] ; then
+ if [ -z "$REDO_FILE" -o ! -f "$REDO_FILE" ]; then
break
fi
- done
- fi
-else
- echo >&2 "Internal error, unhandled '$SELECTED_GUI'"
+ done
fi

# cleanup

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages