Mailinglist Archive: yast-commit (693 mails)
| < Previous | Next > |
[yast-commit] r56055 - in /trunk/installation: package/yast2-installation.changes src/clients/inst_automatic_configuration.ycp
- From: locilka@xxxxxxxxxxxxxxxx
- Date: Tue, 10 Mar 2009 15:09:11 -0000
- Message-id: <E1Lh3Zv-0002VR-K1@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Tue Mar 10 16:09:11 2009
New Revision: 56055
URL: http://svn.opensuse.org/viewcvs/yast?rev=56055&view=rev
Log:
- Added recovery support for AC (dialogs) possibly called by AC
scripts (bnc #483211).
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_automatic_configuration.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=56055&r1=56054&r2=56055&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Tue Mar 10 16:09:11
2009
@@ -3,6 +3,8 @@
- Obsolete 'tar --preserve' replaced with
'tar --preserve-permissions --preserve-order' (bnc #483791).
+- Added recovery support for AC (dialogs) possibly called by AC
+ scripts (bnc #483211).
-------------------------------------------------------------------
Thu Feb 26 16:00:44 CET 2009 - ug@xxxxxxx
Modified: trunk/installation/src/clients/inst_automatic_configuration.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_automatic_configuration.ycp?rev=56055&r1=56054&r2=56055&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_automatic_configuration.ycp (original)
+++ trunk/installation/src/clients/inst_automatic_configuration.ycp Tue Mar 10
16:09:11 2009
@@ -21,6 +21,7 @@
// and sets sections of ProductFeatures
import "ProductControl";
import "ProductFeatures";
+ import "InstError";
textdomain "installation";
@@ -156,13 +157,61 @@
}
}
+ integer nr_of_steps = 0;
+
+ void SetWizardContents () {
+ Wizard::SetContents (
+ _("Automatic Configuration"),
+ `VBox (
+ // faster progress
+ `ReplacePoint(
+ `id ("rp_one_set_progress"),
+ `ProgressBar (
+ `id ("one_set_progress"),
+ _("Preparing configuration..."),
+ 100,
+ 0
+ )
+ ),
+ // overall-autoconf progress
+ `ProgressBar (
+ `id ("autoconf_progress"),
+ _("Creating automatic configuration..."),
+ nr_of_steps,
+ 0
+ )
+ ),
+ _("<p>Installation is currently writing the automatic
configuration. Please wait...</p>"),
+ false, false
+ );
+ }
+
integer current_sub_step = 0;
integer current_step = 0;
+ string current_client = "";
void NextStep () {
current_sub_step = current_sub_step + 1;
current_step = current_step + 1;
+ // BNC #483211: It might happen that some client close the dialog
+ if (! UI::WidgetExists (`id (`next)) && ! UI::WidgetExists (`id
(`back)) && ! UI::WidgetExists (`id (`abort))) {
+ y2error ("There is no Wizard dialog open! Creating one...");
+ Wizard::OpenNextBackStepsDialog();
+ InstError::ShowErrorPopupWithLogs (
+ sformat (_("An error has occured while calling '%1' AC
script."), current_client)
+ );
+ }
+
+ // BNC #483211: It might happen that some client changes the dialog
+ if (! UI::WidgetExists (`id ("one_set_progress")) || ! UI::WidgetExists
(`id ("autoconf_progress"))) {
+ y2error ("There is no Automatic Configuration dialog, adjusting the
current one...");
+ SetWizardContents();
+ InstError::ShowErrorPopupWithLogs (
+ sformat (_("An error has occured while calling '%1' AC
script."), current_client)
+ );
+ }
+
if (UI::WidgetExists (`id ("one_set_progress")))
UI::ChangeWidget (`id ("one_set_progress"), `Value,
current_sub_step);
else
@@ -185,6 +234,7 @@
foreach (string one_script, scripts_to_call, {
y2milestone ("Calling script %1", one_script);
+ current_client = one_script;
NextStep();
boolean progress_before = Progress::set (false);
@@ -207,6 +257,7 @@
foreach (string one_proposal, proposals_to_call, {
y2milestone ("Calling script %1 MakeProposal", one_proposal);
+ current_client = one_proposal;
NextStep();
boolean progress_before = Progress::set (false);
@@ -231,6 +282,7 @@
foreach (string one_proposal, proposals_to_call, {
y2milestone ("Calling script %1 Write", one_proposal);
+ current_client = one_proposal;
NextStep();
boolean progress_before = Progress::set (false);
@@ -245,38 +297,13 @@
});
}
- integer nr_of_steps = 0;
-
foreach (map one_autoconf_call, proposal_scripts_to_call, {
nr_of_steps = nr_of_steps +
// Proposals have two steps, scripts only one
((one_autoconf_call["type"]:"" == "proposals" ? 2:1) * size
(one_autoconf_call["items"]:[]));
});
- Wizard::SetContents (
- _("Automatic Configuration"),
- `VBox (
- // faster progress
- `ReplacePoint(
- `id ("rp_one_set_progress"),
- `ProgressBar (
- `id ("one_set_progress"),
- _("Preparing configuration..."),
- 100,
- 0
- )
- ),
- // overall-autoconf progress
- `ProgressBar (
- `id ("autoconf_progress"),
- _("Creating automatic configuration..."),
- nr_of_steps,
- 0
- )
- ),
- _("<p>Installation is currently writing the automatic configuration.
Please wait...</p>"),
- false, false
- );
+ SetWizardContents();
foreach (map one_autoconf_call, proposal_scripts_to_call, {
if (one_autoconf_call["icon"]:"" != "") {
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Tue Mar 10 16:09:11 2009
New Revision: 56055
URL: http://svn.opensuse.org/viewcvs/yast?rev=56055&view=rev
Log:
- Added recovery support for AC (dialogs) possibly called by AC
scripts (bnc #483211).
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_automatic_configuration.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=56055&r1=56054&r2=56055&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Tue Mar 10 16:09:11
2009
@@ -3,6 +3,8 @@
- Obsolete 'tar --preserve' replaced with
'tar --preserve-permissions --preserve-order' (bnc #483791).
+- Added recovery support for AC (dialogs) possibly called by AC
+ scripts (bnc #483211).
-------------------------------------------------------------------
Thu Feb 26 16:00:44 CET 2009 - ug@xxxxxxx
Modified: trunk/installation/src/clients/inst_automatic_configuration.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_automatic_configuration.ycp?rev=56055&r1=56054&r2=56055&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_automatic_configuration.ycp (original)
+++ trunk/installation/src/clients/inst_automatic_configuration.ycp Tue Mar 10
16:09:11 2009
@@ -21,6 +21,7 @@
// and sets sections of ProductFeatures
import "ProductControl";
import "ProductFeatures";
+ import "InstError";
textdomain "installation";
@@ -156,13 +157,61 @@
}
}
+ integer nr_of_steps = 0;
+
+ void SetWizardContents () {
+ Wizard::SetContents (
+ _("Automatic Configuration"),
+ `VBox (
+ // faster progress
+ `ReplacePoint(
+ `id ("rp_one_set_progress"),
+ `ProgressBar (
+ `id ("one_set_progress"),
+ _("Preparing configuration..."),
+ 100,
+ 0
+ )
+ ),
+ // overall-autoconf progress
+ `ProgressBar (
+ `id ("autoconf_progress"),
+ _("Creating automatic configuration..."),
+ nr_of_steps,
+ 0
+ )
+ ),
+ _("<p>Installation is currently writing the automatic
configuration. Please wait...</p>"),
+ false, false
+ );
+ }
+
integer current_sub_step = 0;
integer current_step = 0;
+ string current_client = "";
void NextStep () {
current_sub_step = current_sub_step + 1;
current_step = current_step + 1;
+ // BNC #483211: It might happen that some client close the dialog
+ if (! UI::WidgetExists (`id (`next)) && ! UI::WidgetExists (`id
(`back)) && ! UI::WidgetExists (`id (`abort))) {
+ y2error ("There is no Wizard dialog open! Creating one...");
+ Wizard::OpenNextBackStepsDialog();
+ InstError::ShowErrorPopupWithLogs (
+ sformat (_("An error has occured while calling '%1' AC
script."), current_client)
+ );
+ }
+
+ // BNC #483211: It might happen that some client changes the dialog
+ if (! UI::WidgetExists (`id ("one_set_progress")) || ! UI::WidgetExists
(`id ("autoconf_progress"))) {
+ y2error ("There is no Automatic Configuration dialog, adjusting the
current one...");
+ SetWizardContents();
+ InstError::ShowErrorPopupWithLogs (
+ sformat (_("An error has occured while calling '%1' AC
script."), current_client)
+ );
+ }
+
if (UI::WidgetExists (`id ("one_set_progress")))
UI::ChangeWidget (`id ("one_set_progress"), `Value,
current_sub_step);
else
@@ -185,6 +234,7 @@
foreach (string one_script, scripts_to_call, {
y2milestone ("Calling script %1", one_script);
+ current_client = one_script;
NextStep();
boolean progress_before = Progress::set (false);
@@ -207,6 +257,7 @@
foreach (string one_proposal, proposals_to_call, {
y2milestone ("Calling script %1 MakeProposal", one_proposal);
+ current_client = one_proposal;
NextStep();
boolean progress_before = Progress::set (false);
@@ -231,6 +282,7 @@
foreach (string one_proposal, proposals_to_call, {
y2milestone ("Calling script %1 Write", one_proposal);
+ current_client = one_proposal;
NextStep();
boolean progress_before = Progress::set (false);
@@ -245,38 +297,13 @@
});
}
- integer nr_of_steps = 0;
-
foreach (map one_autoconf_call, proposal_scripts_to_call, {
nr_of_steps = nr_of_steps +
// Proposals have two steps, scripts only one
((one_autoconf_call["type"]:"" == "proposals" ? 2:1) * size
(one_autoconf_call["items"]:[]));
});
- Wizard::SetContents (
- _("Automatic Configuration"),
- `VBox (
- // faster progress
- `ReplacePoint(
- `id ("rp_one_set_progress"),
- `ProgressBar (
- `id ("one_set_progress"),
- _("Preparing configuration..."),
- 100,
- 0
- )
- ),
- // overall-autoconf progress
- `ProgressBar (
- `id ("autoconf_progress"),
- _("Creating automatic configuration..."),
- nr_of_steps,
- 0
- )
- ),
- _("<p>Installation is currently writing the automatic configuration.
Please wait...</p>"),
- false, false
- );
+ SetWizardContents();
foreach (map one_autoconf_call, proposal_scripts_to_call, {
if (one_autoconf_call["icon"]:"" != "") {
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |