Author: locilka
Date: Fri Mar 14 15:09:21 2008
New Revision: 45467
URL: http://svn.opensuse.org/viewcvs/yast?rev=45467&view=rev
Log:
- Added possibility to run automatic configuration instead of the
whole second stage installation (fate #303396).
- Adjusted RPM dependencies.
- Creating and removing the file runme_at_boot is currently handled
by YaST (YCP) installation scripts.
Added:
trunk/installation/src/clients/automatic_configuration_finish.ycp
trunk/installation/src/clients/inst_automatic_configuration.ycp
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_finish.ycp
trunk/installation/src/clients/inst_installation_settings.ycp
trunk/installation/src/clients/inst_mode.ycp
trunk/installation/src/clients/inst_proposal.ycp
trunk/installation/src/clients/inst_suseconfig.ycp
trunk/installation/src/clients/inst_worker_continue.ycp
trunk/installation/src/clients/inst_worker_initial.ycp
trunk/installation/src/clients/yast_inf_finish.ycp
trunk/installation/src/include/inst_inc_all.ycp
trunk/installation/src/include/inst_inc_first.ycp
trunk/installation/src/include/inst_inc_second.ycp
trunk/installation/src/include/misc.ycp
trunk/installation/src/modules/InstData.ycp
trunk/installation/startup/YaST2.call
trunk/installation/yast2-installation.spec.in
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=45467&r1=45466&r2=45467&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Fri Mar 14 15:09:21 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Fri Mar 14 15:02:27 CET 2008 - locilka@suse.cz
+
+- Added possibility to run automatic configuration instead of the
+ whole second stage installation (fate #303396).
+- Adjusted RPM dependencies.
+- Creating and removing the file runme_at_boot is currently handled
+ by YaST (YCP) installation scripts.
+
+-------------------------------------------------------------------
Mon Mar 10 11:25:57 CET 2008 - locilka@suse.cz
- Disabling the window menu in IceWM preferences to make the
Added: trunk/installation/src/clients/automatic_configuration_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/automatic_configuration_finish.ycp?rev=45467&view=auto
==============================================================================
--- trunk/installation/src/clients/automatic_configuration_finish.ycp (added)
+++ trunk/installation/src/clients/automatic_configuration_finish.ycp Fri Mar 14 15:09:21 2008
@@ -0,0 +1,105 @@
+/**
+ * File: clients/automatic_configuration_finish.ycp
+ * Package: installation
+ * Summary: Automatic configuration instead of the second stage (Preview)
+ * Authors: Lukas Ocilka
+ * ThanksTo: Martin Vidner
+ * Ladislav Slezak
+ *
+ * $Id:$
+ *
+ * @see http://visnov.blogspot.com/2008/02/getting-rid-of-2nd-stage-of.html
+ */
+
+{
+ import "Report";
+ import "FileUtils";
+ import "Installation";
+ import "ProductControl";
+
+ textdomain "installation";
+
+ any ret = nil;
+ string func = "";
+ map param = $[];
+
+ /* Check arguments */
+ if(size(WFM::Args()) > 0 && is (WFM::Args (0), string)) {
+ func = (string) WFM::Args (0);
+ if (size (WFM::Args()) > 1 && is (WFM::Args (1), map))
+ param = (map) WFM::Args (1);
+ }
+ y2milestone ("starting automatic_configuration_finish");
+ y2debug("func=%1", func);
+ y2debug("param=%1", param);
+
+ // functions -->
+
+ string zypp_lock_file = "/var/run/zypp.pid";
+
+ void RemoveZyppLockIfExists () {
+ // a bit cruel, remove the zypp log if exists
+ if (FileUtils::Exists (zypp_lock_file)) {
+ y2milestone ("Removing zypp lock %1", zypp_lock_file);
+ SCR::Execute (.target.remove, zypp_lock_file);
+ }
+ }
+
+ void Write () {
+ // Just to be sure...
+ Pkg::SourceFinishAll();
+ Pkg::TargetFinish();
+
+ RemoveZyppLockIfExists();
+ // FIXME: should be done somehow else and somewhere else...?
+ if (! FileUtils::Exists ("/mnt/etc/install.inf")) {
+ y2milestone ("Copying install.inf");
+ WFM::Execute (.local.bash, "cp /etc/install.inf /mnt/etc/install.inf");
+ }
+
+ // FIXME: just for testing
+ if (! FileUtils::Exists ("/mnt/share/YaST2/clients/inst_automatic_configuration.ycp")) {
+ Report::Message ("Copy all clients to the just installed system");
+ }
+
+ y2milestone ("~~~ MAGIC! -----------------------------------------------------------------");
+
+ integer old_SCR = WFM::SCRGetDefault();
+ integer new_SCR = WFM::SCROpen ("chroot="+Installation::destdir+":scr", false);
+ WFM::SCRSetDefault (new_SCR);
+
+ RemoveZyppLockIfExists();
+ y2milestone ("Running autoconf - a separate YaST process");
+ // FIXME: Y2DEBUG is used just for debugging purpose
+ string cmd = "Y2DEBUG=1 /usr/lib/YaST2/bin/y2base /usr/share/YaST2/clients/inst_automatic_configuration.ycp UI";
+ // FIXME: use process agent
+ // and use lome logging to file and `tail -F` from here
+ map cmd_ret = (map) SCR::Execute (.target.bash_output, cmd);
+ y2milestone ("Command '%1' returned %2", cmd, cmd_ret);
+
+ WFM::SCRClose (new_SCR);
+ WFM::SCRSetDefault (old_SCR);
+
+ y2milestone ("~~~ MAGIC! -----------------------------------------------------------------");
+ }
+
+ // <-- functions
+
+ // main()
+ if (func == "Info") {
+ ret = (any) $[
+ "steps" : 1,
+ // progress step title
+ "title" : _("Writing automatic configuration..."),
+ // only when requested
+ "when" : (ProductControl::GetUseAutomaticConfiguration() == true ? [ `installation ] : []),
+ ];
+ } else if (func == "Write") {
+ Write();
+ } else {
+ y2error ("unknown function: %1", func);
+ ret = nil;
+ }
+
+ return ret;
+}
Added: trunk/installation/src/clients/inst_automatic_configuration.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_automatic_configuration.ycp?rev=45467&view=auto
==============================================================================
--- trunk/installation/src/clients/inst_automatic_configuration.ycp (added)
+++ trunk/installation/src/clients/inst_automatic_configuration.ycp Fri Mar 14 15:09:21 2008
@@ -0,0 +1,130 @@
+/**
+ * File: clients/inst_automatic_configuration.ycp
+ * Package: installation
+ * Summary: Automatic configuration instead of the second stage (Preview)
+ * Authors: Lukas Ocilka
+ *
+ * $Id:$
+ *
+ * @see http://visnov.blogspot.com/2008/02/getting-rid-of-2nd-stage-of.html
+ */
+
+{
+ import "Mode";
+ import "Stage";
+ import "FileUtils";
+ import "Directory";
+
+ textdomain "installation";
+
+ y2milestone ("automatic_configuration started");
+
+ Mode::SetMode ("installation");
+ Stage::Set ("continue");
+
+ list