Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] r58525 - in /trunk/installation/src: clients/inst_automatic_configuration.ycp include/inst_inc_second.ycp inst_finish/installation_settings_finish.ycp modules/InstData.ycp
  • From: kmachalkova@xxxxxxxxxxxxxxxx
  • Date: Fri, 04 Sep 2009 12:20:57 -0000
  • Message-id: <E1MjXmj-00055S-K7@xxxxxxxxxxxxxxxx>
Author: kmachalkova
Date: Fri Sep 4 14:20:57 2009
New Revision: 58525

URL: http://svn.opensuse.org/viewcvs/yast?rev=58525&view=rev
Log:
Write disabled AC items at the end of 1st stage,
read them in the beginning of 2nd stage,
exclude them from AC workflow

Modified:
trunk/installation/src/clients/inst_automatic_configuration.ycp
trunk/installation/src/include/inst_inc_second.ycp
trunk/installation/src/inst_finish/installation_settings_finish.ycp
trunk/installation/src/modules/InstData.ycp

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=58525&r1=58524&r2=58525&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_automatic_configuration.ycp (original)
+++ trunk/installation/src/clients/inst_automatic_configuration.ycp Fri Sep 4
14:20:57 2009
@@ -64,8 +64,10 @@
return `next;
}

+ map< string, list <string> > disabled_ac_items =
ProductControl::GetDisabledACItems();
foreach (map one_step, acc, {
map new_step = $[
+ "unique" : one_step["unique_id"]:"",
"label" : one_step["text_id"]:"",
"icon" : one_step["icon"]:"yast",
"type" : one_step["type"]:"scripts",
@@ -81,6 +83,12 @@
return false;
}

+ if ( haskey( disabled_ac_items, new_step["unique"]:"") &&
+ contains(disabled_ac_items[ new_step["unique"]:"" ]:[],
one_item ) ) {
+ y2milestone("Item %1 found among disabled items", one_item);
+ return false;
+ }
+
return true;
});


Modified: trunk/installation/src/include/inst_inc_second.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/include/inst_inc_second.ycp?rev=58525&r1=58524&r2=58525&view=diff
==============================================================================
--- trunk/installation/src/include/inst_inc_second.ycp (original)
+++ trunk/installation/src/include/inst_inc_second.ycp Fri Sep 4 14:20:57 2009
@@ -80,9 +80,36 @@
y2milestone ("Disabled proposals set to %1",
ProductControl::GetDisabledProposals());
}

+ void AdjustDisabledACItems () {
+ if (InstData::wizardsteps_disabled_ac_items == nil) {
+ y2error ("Disabled AC items file not defined");
+ return;
+ }
+
+ if (! FileUtils::Exists (InstData::wizardsteps_disabled_ac_items)) {
+ y2milestone ("File %1 doesn't exist, skipping...",
InstData::wizardsteps_disabled_ac_items);
+ return;
+ }
+
+ map <string, list <string> > disabled_ac_items = (map <string, list
<string> >) SCR::Read (.target.ycp, InstData::wizardsteps_disabled_ac_items);
+ if (disabled_ac_items == nil) {
+ y2error ("Error reading %1",
InstData::wizardsteps_disabled_ac_items);
+ return;
+ }
+
+ foreach (string unique_id, list<string> ac_steps, disabled_ac_items, {
+ foreach (string one_ac_step, ac_steps, {
+ ProductControl::DisableACItem (unique_id, one_ac_step);
+ });
+ });
+
+ y2milestone ("Disabled AC items set to %1",
ProductControl::GetDisabledACItems());
+ }
+
void AdjustDisabledItems () {
AdjustDisabledModules();
AdjustDisabledProposals();
+ AdjustDisabledACItems();
}

/**

Modified: trunk/installation/src/inst_finish/installation_settings_finish.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/inst_finish/installation_settings_finish.ycp?rev=58525&r1=58524&r2=58525&view=diff
==============================================================================
--- trunk/installation/src/inst_finish/installation_settings_finish.ycp
(original)
+++ trunk/installation/src/inst_finish/installation_settings_finish.ycp Fri Sep
4 14:20:57 2009
@@ -61,6 +61,17 @@
y2error ("Cannot write disabled proposals");
}

+ y2milestone (
+ "Writing disabled AC items %1 into %2",
+ ProductControl::GetDisabledACItems(),
+ InstData::wizardsteps_disabled_ac_items
+ );
+
+ if ((boolean) SCR::Write (.target.ycp,
InstData::wizardsteps_disabled_ac_items, ProductControl::GetDisabledACItems())
!= true) {
+ y2error ("Cannot write disabled AC items");
+ }
+
+
// bnc #390930
// Since there is no second stage during upgrade, SuSEConfig has to be
run
// by hooks

Modified: trunk/installation/src/modules/InstData.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/InstData.ycp?rev=58525&r1=58524&r2=58525&view=diff
==============================================================================
--- trunk/installation/src/modules/InstData.ycp (original)
+++ trunk/installation/src/modules/InstData.ycp Fri Sep 4 14:20:57 2009
@@ -43,6 +43,7 @@
// see bnc #364066
global string wizardsteps_disabled_modules = Directory::vardir +
"/installation_disabled_steps";
global string wizardsteps_disabled_proposals = Directory::vardir +
"/installation_disabled_proposals";
+ global string wizardsteps_disabled_ac_items = Directory::vardir +
"/installation_disabled_acs";

// temporary variables for disabling and enabling steps
global list <string> localDisabledModules = [];

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

< Previous Next >
This Thread
  • No further messages