Mailinglist Archive: yast-commit (503 mails)

< Previous Next >
[yast-commit] r40672 - in /trunk/yast2: VERSION package/yast2.changes scripts/yast2
  • From: mvidner@xxxxxxxxxxxxxxxx
  • Date: Mon, 03 Sep 2007 06:24:47 -0000
  • Message-id: <20070903062448.0880824F73@xxxxxxxxxxxxxxxx>
Author: mvidner
Date: Mon Sep  3 08:24:47 2007
New Revision: 40672

URL: http://svn.opensuse.org/viewcvs/yast?rev=40672&view=rev
Log:
Use xmessage only if y2base fails. Don't use it for harmless
warnings (#265263#c59).

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

Modified: trunk/yast2/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=40672&r1=40671&r2=40672&view=diff
==============================================================================
--- trunk/yast2/VERSION (original)
+++ trunk/yast2/VERSION Mon Sep  3 08:24:47 2007
@@ -1 +1 @@
-2.15.51
+2.15.52

Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=40672&r1=40671&r2=40672&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Mon Sep  3 08:24:47 2007
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Sep  3 08:24:32 CEST 2007 - mvidner@xxxxxxx
+
+- Use xmessage only if y2base fails. Don't use it for harmless
+  warnings (#265263#c59).
+- 2.15.52
+
+-------------------------------------------------------------------
 Fri Aug 31 10:34:10 CEST 2007 - locilka@xxxxxxx
 
 - Fixing evaluation of unreadable cpuflags in Kernel.ycp (#303842).

Modified: trunk/yast2/scripts/yast2
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/yast2?rev=40672&r1=40671&r2=40672&view=diff
==============================================================================
--- trunk/yast2/scripts/yast2 (original)
+++ trunk/yast2/scripts/yast2 Mon Sep  3 08:24:47 2007
@@ -17,27 +17,28 @@
 # load common script functions
 . /usr/lib/YaST2/bin/yast2-funcs
 
-# redirect to $@ if the input is not empty, #265263
-redir_nonempty()
-{
-    local IFS='' L
-    read L || return
-    exec &> >("$@")
-    echo "$L"
-    cat
-}
 
-# #211392
+# #211392, #265263
 # if we are in X and do not have _input_ from terminal,
-# make it output to xmessage
+# save the output and display it via xmessage in case of error.
+# TODO: also use bug-buddy or the kde thing... (#265263#c48)
 redirect()
 {
     if [ -n "$DISPLAY" -a ! -t 0 ]; then
-        XMESSAGE=`type -p xmessage`
-       if [ -n "$XMESSAGE" ]; then
-           exec &> >(redir_nonempty $XMESSAGE -buttons OK:0 -default OK -center -file -)
-       fi
+       ERRLOG=`mktemp -t yast2-err-XXXXXX`
+       trap exit_trap EXIT
+       exec &> $ERRLOG
+    fi
+}
+
+exit_trap()
+{
+    # handily, exit_code is set to $? of y2base.
+    # If there was an error and there is anything to display, pop up.
+    if [ $exit_code != 0 -a -s $ERRLOG ]; then
+       xmessage -buttons OK:0 -default OK -center -file $ERRLOG
     fi
+    rm -f $ERRLOG
 }
 # redirect the output if necessary
 redirect

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

< Previous Next >
This Thread
  • No further messages