Author: jsrain
Date: Fri Apr 11 14:17:17 2008
New Revision: 46402
URL: http://svn.opensuse.org/viewcvs/yast?rev=46402&view=rev
Log:
added possiblity to load software selection from AutoYaST profile (fate #302501)
Modified:
trunk/dirinstall/package/yast2-dirinstall.changes
trunk/dirinstall/src/clients/dirinstall.ycp
trunk/dirinstall/src/clients/dirinstall_options.ycp
trunk/dirinstall/src/modules/DirInstall.ycp
trunk/dirinstall/yast2-dirinstall.spec.in
Modified: trunk/dirinstall/package/yast2-dirinstall.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/package/yast2-dirinstall.changes?rev=46402&r1=46401&r2=46402&view=diff
==============================================================================
--- trunk/dirinstall/package/yast2-dirinstall.changes (original)
+++ trunk/dirinstall/package/yast2-dirinstall.changes Fri Apr 11 14:17:17 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Apr 11 13:55:26 CEST 2008 - jsrain@suse.cz
+
+- added possiblity to load software selection from AutoYaST profile
+ (fate #302501)
+
+-------------------------------------------------------------------
Mon Mar 17 12:43:32 CET 2008 - jsrain@suse.cz
- added 'StartupNotify=true' to the desktop file (bnc #304964)
Modified: trunk/dirinstall/src/clients/dirinstall.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/src/clients/dirinstall.ycp?rev=46402&r1=46401&r2=46402&view=diff
==============================================================================
--- trunk/dirinstall/src/clients/dirinstall.ycp (original)
+++ trunk/dirinstall/src/clients/dirinstall.ycp Fri Apr 11 14:17:17 2008
@@ -110,6 +110,7 @@
map prod = prods[0]:$[];
integer source = prod["source"]:-1;
map src_data = Pkg::SourceGeneralData (source);
+ y2milestone ("Repository: %1", src_data);
Pkg::SourceSetEnabled (source, false);
string url = src_data["url"]:"";
string dir = src_data["product_dir"]:"/";
Modified: trunk/dirinstall/src/clients/dirinstall_options.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/src/clients/dirinstall_options.ycp?rev=46402&r1=46401&r2=46402&view=diff
==============================================================================
--- trunk/dirinstall/src/clients/dirinstall_options.ycp (original)
+++ trunk/dirinstall/src/clients/dirinstall_options.ycp Fri Apr 11 14:17:17 2008
@@ -14,6 +14,10 @@
import "Installation";
import "Wizard";
import "Popup";
+ import "Label";
+ import "Profile";
+ import "AutoinstSoftware";
+ import "Report";
// screen title for installation into directory options
string title = _("Directory Install Options");
@@ -28,6 +32,18 @@
`Left(`TextEntry(`id(`target), _("&Root Directory (not \"/\"):"), DirInstall::GetTarget())),
// check box
`Left(`CheckBox(`id(`suseconfig), _("Run &YaST and SuSEconfig on First Boot"), DirInstall::runme_at_boot)),
+ `Left(`CheckBox(`id(`use_autoyast), `opt (`notify), _("Get Software Selection from AutoYaST Profile"), DirInstall::use_autoyast_software)),
+ `VSquash(
+ `HBox(
+ // text entry
+ `TextEntry(`id(`autoyast), _("&AutoYaST Profile"), DirInstall::autoyast_software),
+ `VBox(
+ `VSpacing(),
+ // push button
+ `Bottom(`PushButton(`id(`open_profile), Label::BrowseButton ()))
+ )
+ )
+ ),
// check box
`Left(`CheckBox(`id(`makeimage), `opt(`notify), _("Create Ima&ge"), DirInstall::makeimage)),
// text entry
@@ -76,6 +92,9 @@
UI::ChangeWidget(`id(`imagedir) , `Enabled, false);
UI::ChangeWidget(`id(`open_dir) , `Enabled, false);
}
+ boolean autoyast = (boolean)UI::QueryWidget (`id(`use_autoyast), `Value);
+ UI::ChangeWidget (`id(`autoyast), `Enabled, autoyast);
+ UI::ChangeWidget (`id(`open_profile), `Enabled, autoyast);
ret = Wizard::UserInput ();
if (ret == `abort && Popup::ConfirmAbort (`painless))
@@ -93,6 +112,16 @@
}
continue;
}
+ if (ret == `open_profile)
+ {
+ string current_file = (string)UI::QueryWidget (`id (`autoyast), `Value);
+ any file = UI::AskForExistingFile (current_file, "*.xml", _("Select AutoYaST Profile"));
+ if (file != nil)
+ {
+ UI::ChangeWidget(`id(`autoyast), `Value, (string)file);
+ }
+ continue;
+ }
if (ret == `next)
{
string target =(string) UI::QueryWidget (`id(`target), `Value);
@@ -100,6 +129,22 @@
DirInstall::makeimage = (boolean) UI::QueryWidget (`id(`makeimage), `Value);
DirInstall::image_name = (string) UI::QueryWidget (`id(`imagename), `Value);
DirInstall::image_dir = (string) UI::QueryWidget (`id(`imagedir), `Value);
+ string w_autoyast = (string)UI::QueryWidget (`id (`autoyast), `Value);
+
+ if ((boolean)UI::QueryWidget (`id (`use_autoyast), `Value)
+ && (DirInstall::autoyast_software != w_autoyast
+ || ! DirInstall::use_autoyast_software))
+ {
+ if (! ( Profile::ReadXML( w_autoyast )
+ || AutoinstSoftware::Import(Profile::current["software"]:$[])))
+ {
+ Report::Error (_("Failed to read the AutoYaST profile."));
+ continue;
+ }
+ AutoinstSoftware::Write();
+ }
+ DirInstall::use_autoyast_software = (boolean)UI::QueryWidget (`id (`use_autoyast), `Value);
+ DirInstall::autoyast_software = w_autoyast;
if(target == "" || target == "/")
{
Modified: trunk/dirinstall/src/modules/DirInstall.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/src/modules/DirInstall.ycp?rev=46402&r1=46401&r2=46402&view=diff
==============================================================================
--- trunk/dirinstall/src/modules/DirInstall.ycp (original)
+++ trunk/dirinstall/src/modules/DirInstall.ycp Fri Apr 11 14:17:17 2008
@@ -22,6 +22,8 @@
global boolean makeimage = false;
global string image_dir = "";
global string image_name = "";
+global boolean use_autoyast_software = false;
+global string autoyast_software = "";
global string dirinstall_control_file =
@@ -89,6 +91,10 @@
_("No"), color) ));
// Proposal for dirinstall installation
tmp = add (tmp, sformat (_("Create Image: %1"), HTML::Colorize(DirInstall::makeimage ? _("Yes"): _("No"), color) ));
+ if (use_autoyast_software)
+ // Proposal for dirinstall installation
+ tmp = add (tmp, sformat (_("Load software selection from %1"), autoyast_software));
+
return HTML::List (tmp);
}
Modified: trunk/dirinstall/yast2-dirinstall.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dirinstall/yast2-dirinstall.spec.in?rev=46402&r1=46401&r2=46402&view=diff
==============================================================================
--- trunk/dirinstall/yast2-dirinstall.spec.in (original)
+++ trunk/dirinstall/yast2-dirinstall.spec.in Fri Apr 11 14:17:17 2008
@@ -7,7 +7,7 @@
# Package-split
Requires: yast2-packager >= 2.16.3
-Requires: yast2 yast2-country yast2-mouse yast2-runlevel
+Requires: yast2 yast2-country yast2-mouse yast2-runlevel autoyast2-installation
BuildRequires: yast2 >= 2.16.7
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-testsuite
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org