Author: ug
Date: Fri Feb 1 13:17:00 2008
New Revision: 44100
URL: http://svn.opensuse.org/viewcvs/yast?rev=44100&view=rev
Log:
an ask script can influence the next dialog that is shown (fate #303398)
Modified:
trunk/autoinstallation/VERSION
trunk/autoinstallation/doc/CreateProfileDetails.xml
trunk/autoinstallation/package/autoyast2.changes
trunk/autoinstallation/src/dialogs/ask.ycp
Modified: trunk/autoinstallation/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/VERSION?rev=44100&r1=44099&r2=44100&view=diff
==============================================================================
--- trunk/autoinstallation/VERSION (original)
+++ trunk/autoinstallation/VERSION Fri Feb 1 13:17:00 2008
@@ -1 +1 @@
-2.16.6
+2.16.7
Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/CreateProfileDetails.xml?rev=44100&r1=44099&r2=44100&view=diff
==============================================================================
--- trunk/autoinstallation/doc/CreateProfileDetails.xml (original)
+++ trunk/autoinstallation/doc/CreateProfileDetails.xml Fri Feb 1 13:17:00 2008
@@ -2619,7 +2619,7 @@
</row>
<row>
<entry>source</entry>
- <entry>the source code of the script
+ <entry>the source code of the script. Together with "rerun_on_error" on you check the value that was entered for sanity (since 11.0 only). Your script can create a file "/tmp/next_dialog" with a dialog id in it. That's the next dialog autoyast will raise then. A value of -1 terminates the ask sequence. If that file is not created, autoyast will run the dialogs in a normal order (since 11.0 only)
<para><screen><source>...</source></screen></para></entry>
<entry>this value is required. Otherwise nothing would be executed</entry>
</row>
Modified: trunk/autoinstallation/package/autoyast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=44100&r1=44099&r2=44100&view=diff
==============================================================================
--- trunk/autoinstallation/package/autoyast2.changes (original)
+++ trunk/autoinstallation/package/autoyast2.changes Fri Feb 1 13:17:00 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Feb 1 13:14:34 CET 2008 - ug@suse.de
+
+- an ask script can influence the next dialog that is shown
+ (fate #303398)
+- 2.16.7
+
+-------------------------------------------------------------------
Fri Jan 18 09:49:35 CET 2008 - ug@suse.de
- shell escape code fixed (#354671)
Modified: trunk/autoinstallation/src/dialogs/ask.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/ask.ycp?rev=44100&r1=44099&r2=44100&view=diff
==============================================================================
--- trunk/autoinstallation/src/dialogs/ask.ycp (original)
+++ trunk/autoinstallation/src/dialogs/ask.ycp Fri Feb 1 13:17:00 2008
@@ -47,7 +47,23 @@
}
});
- foreach( integer dialog_nr, sort( keys ), ``{
+ keys = sort( keys );
+
+ integer dialogCounter = 0;
+ integer dialog_nr = keys[dialogCounter]:-1;
+ integer jumpToDialog = -2;
+ if( SCR::Read(.target.size, "/tmp/next_dialog") > 0 ) {
+ string s = (string)(SCR::Read(.target.string, "/tmp/next_dialog"));
+ s = filterchars( s, "0123456789" );
+ jumpToDialog = tointeger(s);
+ SCR::Execute(.target.remove, "/tmp/next_dialog");
+ y2milestone("next_dialog file found. Set dialog to %1",jumpToDialog);
+ }
+ while( dialog_nr != -1 ) {
+// foreach( integer dialog_nr, sort( keys ), ``{
+ y2milestone("dialog_nr = %1",dialog_nr);
+ y2milestone("dialogCounter = %1",dialogCounter);
+ y2milestone("jumpToDialog %1",jumpToDialog);
string helptext = "";
string title = "";
term dialog_term = `VBox();
@@ -77,7 +93,7 @@
} else if( type == "symbol" ) {
list<any> dummy = [];
foreach( map