Author: ug Date: Thu Jan 10 14:56:39 2008 New Revision: 43530 URL: http://svn.opensuse.org/viewcvs/yast?rev=43530&view=rev Log: rerun_on_error added to scripts execution Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/dialogs/ask.ycp Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/CreateProfileDetails.xml?rev=43530&r1=43529&r2=43530&view=diff ============================================================================== --- trunk/autoinstallation/doc/CreateProfileDetails.xml (original) +++ trunk/autoinstallation/doc/CreateProfileDetails.xml Thu Jan 10 14:56:39 2008 @@ -2683,6 +2683,12 @@ <para><screen><debug config:type="boolean">true</debug></screen></para></entry> <entry>optional (default is "false"). This value needs feedback to be turned on too.</entry> </row> + <row> + <entry>rerun_on_error</entry> + <entry>a boolean that keeps the dialog open until the script has an exit code of 0 (zero). So you can parse and check the answers the user gave in the script and popup an error with the "feedback" option. + <para><screen><rerun_on_error config:type="boolean">true</rerun_on_error></screen></para></entry> + <entry>optional (default is "false"). This value should be used together with the feedback option.</entry> + </row> </tbody> </tgroup> Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=43530&r1=43529&r2=43530&view=diff ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Thu Jan 10 14:56:39 2008 @@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Thu Jan 10 14:53:24 CET 2008 - ug@suse.de + +- rerun_on_error added to scripts execution to keep <ask> dialogs + open until the answers pass the parsing of a script + +------------------------------------------------------------------- +Wed Jan 9 16:41:29 CET 2008 - ug@suse.de + +- added command line option to jump into a module (fate #5997) + +------------------------------------------------------------------- Tue Jan 8 13:50:59 CET 2008 - ug@suse.de - experimental interactive scripts code added Modified: trunk/autoinstallation/src/dialogs/ask.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/ask.ycp?rev=43530&r1=43529&r2=43530&view=diff ============================================================================== --- trunk/autoinstallation/src/dialogs/ask.ycp (original) +++ trunk/autoinstallation/src/dialogs/ask.ycp Thu Jan 10 14:56:39 2008 @@ -137,6 +137,7 @@ while (true) { any ret = UI::UserInput(); if( ret == `ok ) { + integer runAgain = 0; foreach( map ask, (list<map>)dialogs[dialog_nr]:[], ``{ list<string> position = splitstring( ask["path"]:"", "," ); string file = ask["file"]:""; @@ -185,7 +186,9 @@ else executionString = sformat("/bin/sh %1 %2 2&> %3/%4.log ", debug, scriptPath, current_logdir, scriptName ); y2milestone("Script Execution command: %1", executionString ); - SCR::Execute (.target.bash, executionString); + runAgain = (integer)SCR::Execute (.target.bash, executionString); + if( script["rerun_on_error"]:false == false ) + runAgain = 0; boolean showFeedback = script["feedback"]:false; string feedback = ""; if( showFeedback ) { @@ -196,7 +199,8 @@ } }; }); - break; + if( runAgain == 0 ) + break; } } UI::CloseDialog(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org