Author: kmachalkova Date: Mon May 21 16:37:12 2007 New Revision: 38067 URL: http://svn.opensuse.org/viewcvs/yast?rev=38067&view=rev Log: - Do not show empty xmessage window if nothing is printed to stderr after yast module has exited (mvidner's patch for #265263) 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=38067&r1=38066&r2=38067&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Mon May 21 16:37:12 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon May 21 16:04:31 CEST 2007 - kmachalkova@suse.cz + +- Do not show empty xmessage window if nothing is printed to stderr + after yast module has exited (mvidner's patch for #265263) + +------------------------------------------------------------------- Mon May 21 13:39:58 CEST 2007 - jsrain@suse.cz - fixed chrp board detection (PPC) (#273606) Modified: trunk/yast2/scripts/yast2 URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/yast2?rev=38067&r1=38066&r2=38067&view=diff ============================================================================== --- trunk/yast2/scripts/yast2 (original) +++ trunk/yast2/scripts/yast2 Mon May 21 16:37:12 2007 @@ -17,14 +17,26 @@ # 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 # if we are in X and do not have _input_ from terminal, # make it output to xmessage redirect() { - XMESSAGE=`type -p xmessage` - if $REDIRECT && [ -n "$DISPLAY" -a ! -t 0 -a -n "$XMESSAGE" ]; then - exec &> >($XMESSAGE -buttons OK:0 -default OK -center -file -) + 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 fi } # redirect the output if necessary -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org