Author: jsrain
Date: Wed Jun 27 10:40:12 2007
New Revision: 39041
URL: http://svn.opensuse.org/viewcvs/yast?rev=39041&view=rev
Log:
Updated, nearly working version
Added:
trunk/live-installer/src/live_copy_files_finish.ycp
Removed:
trunk/live-installer/src/complex.ycp
trunk/live-installer/src/dialogs.ycp
trunk/live-installer/src/helps.ycp
trunk/live-installer/src/wizards.ycp
Modified:
trunk/live-installer/src/LiveInstaller.ycp
trunk/live-installer/src/Makefile.am
trunk/live-installer/src/control/live-install.xml
trunk/live-installer/src/live-installer.ycp
trunk/live-installer/src/live_doit.ycp
Modified: trunk/live-installer/src/LiveInstaller.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/LiveInstaller.ycp?rev=39041&r1=39040&r2=39041&view=diff
==============================================================================
--- trunk/live-installer/src/LiveInstaller.ycp (original)
+++ trunk/live-installer/src/LiveInstaller.ycp Wed Jun 27 10:40:12 2007
@@ -33,17 +33,11 @@
{
module "LiveInstaller";
-textdomain "live-installer";
-
-import "ProductControl";
+textdomain "live-installer";
global string live_control_file =
"/etc/YaST2/live-install.xml";
-global void LiveInstaller()
-{
-}
-
/* EOF */
}
Modified: trunk/live-installer/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/Makefile.am?rev=39041&r1=39040&r2=39041&view=diff
==============================================================================
--- trunk/live-installer/src/Makefile.am (original)
+++ trunk/live-installer/src/Makefile.am Wed Jun 27 10:40:12 2007
@@ -4,16 +4,7 @@
client_DATA = \
live-installer.ycp \
- live_doit.ycp \
- live_finish.ycp \
- live_stage_normal.ycp \
- live_stage_initial.ycp
-
-ynclude_DATA = \
- helps.ycp \
- wizards.ycp \
- dialogs.ycp \
- complex.ycp
+ live_doit.ycp
desktop_DATA = \
live-installer.desktop
@@ -26,6 +17,6 @@
ln -sf . $@
ycpchook = live-installer
-EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA) $(desktop_DATA)
+EXTRA_DIST = $(client_DATA) $(module_DATA) $(desktop_DATA)
include $(top_srcdir)/Makefile.am.common
Modified: trunk/live-installer/src/control/live-install.xml
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/control/live-install.xml?rev=39041&r1=39040&r2=39041&view=diff
==============================================================================
--- trunk/live-installer/src/control/live-install.xml (original)
+++ trunk/live-installer/src/control/live-install.xml Wed Jun 27 10:40:12 2007
@@ -76,11 +76,44 @@
</congratulate>
</texts>
+
+
+ <label>Copy files to installed system"</label>
+ <steps config:type="list">
+ <step>live_copy_files</step>
+ <step>switch_scr</step>
+ </steps>
+
+
+ <label>Save configuration</label>
+ <steps config:type="list">
+ <step>ldconfig</step>
+ </steps>
+
+
+ <label>Install boot manager"</label>
+ <steps config:type="list">
+ <step>bootloader</step>
+ </steps>
+
+
+ <label>Prepare system for initial boot"</label>
+ <steps config:type="list">
+<!--
+ copy logs just before 'umount'
+ keeps maximum logs available after reboot
+-->
+ <step>copy_logs</step>
+ <step>umount</step>
+ </steps>
+
+
+
<proposals config:type="list">
<proposal>
<label>Live Installation Settings</label>
<mode>installation</mode>
- <stage>normal</stage>
+ <stage>initial</stage>
<name>initial</name>
no
@@ -101,8 +134,8 @@
</defaults>
<label>Installation</label>
<mode>installation</mode>
- <stage>normal</stage>
- <modules config:type="list">
+ <stage>initial</stage>
+ <modules config:type="list">
<module>
<label>Installation Summary</label>
<name>inst_proposal</name>
@@ -110,10 +143,6 @@
</module>
<module>
<label>Perform Installation</label>
- <name>live_stage_initial</name>
- </module>
- <module>
- <label>Perform Installation</label>
<name>inst_do_resize</name>
<update config:type="boolean">false</update>
<archs>i386,x86_64,ia64</archs>
@@ -128,17 +157,13 @@
</module>
<module>
<label>Perform Installation</label>
- <name>live_mode_normal</name>
- </module>
- <module>
- <label>Perform Installation</label>
<name>live_doit</name>
no
no
</module>
<module>
<label>Perform Installation</label>
- <name>live_finish</name>
+ <name>inst_finish</name>
no
</module>
</modules>
Modified: trunk/live-installer/src/live-installer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live-installer.ycp?rev=39041&r1=39040&r2=39041&view=diff
==============================================================================
--- trunk/live-installer/src/live-installer.ycp (original)
+++ trunk/live-installer/src/live-installer.ycp Wed Jun 27 10:40:12 2007
@@ -21,13 +21,12 @@
Installation::destdir = "/mnt";
Installation::scr_destdir = "/mnt";
- list<map> stage_mode = [$["stage": "normal", "mode": "installation" ]];
+ list<map> stage_mode = [$["stage": "initial", "mode": "installation" ]];
y2internal ("SM: %1", stage_mode);
Mode::SetMode ("installation");
- // required in order to make Storage.ycp honor Installation::destdir
+ // Stage::initial is required for most of the modules to behave correctly
Stage::Set ("initial");
Storage::InitLibstorage ();
- Stage::Set ("normal");
ProductControl::custom_control_file = LiveInstaller::live_control_file;
if (!ProductControl::Init())
Added: trunk/live-installer/src/live_copy_files_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live_copy_files_finish.ycp?rev=39041&view=auto
==============================================================================
--- trunk/live-installer/src/live_copy_files_finish.ycp (added)
+++ trunk/live-installer/src/live_copy_files_finish.ycp Wed Jun 27 10:40:12 2007
@@ -0,0 +1,93 @@
+/**
+ * File:
+ * copy_files_finish.ycp
+ *
+ * Module:
+ * Step of base installation finish
+ *
+ * Authors:
+ * Jiri Srain
+ *
+ * $Id: copy_files_finish.ycp 38430 2007-06-13 13:50:38Z locilka $
+ *
+ */
+
+{
+
+textdomain "installation";
+
+import "Installation";
+import "Directory";
+import "ProductControl";
+import "FileUtils";
+import "String";
+import "SystemFilesCopy";
+
+include "installation/misc.ycp";
+
+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 ("live_starting copy_files_finish");
+y2debug("func=%1", func);
+y2debug("param=%1", param);
+
+if (func == "Info")
+{
+ return (any)$[
+ "steps" : 1,
+ // progress step title
+ "title" : _("Copying files to installed system..."),
+ "when" : [ `installation, `update, `autoinst ],
+ ];
+}
+else if (func == "Write")
+{
+ // bugzilla #221815
+ // Adding blacklisted modules into the /etc/modprobe.d/blacklist
+ // This should run before the SCR::switch function
+ AdjustModprobeBlacklist();
+
+ // Copy control.xml so it can be read once again during continue mode
+ SCR::Execute (.target.bash, "/bin/cp " + ProductControl::current_control_file + " " +
+ "'" + String::Quote (Installation::destdir) + Directory::etcdir + "/control.xml'");
+ SCR::Execute (.target.bash, "/bin/chmod 0644 " +
+ "'" + String::Quote (Installation::destdir) + Directory::etcdir + "/control.xml'");
+
+ // Copy files from inst-sys to the just installed system
+ // FATE #301937, items are defined in the control file
+ SystemFilesCopy::SaveInstSysContent();
+
+ // Remove old eula.txt
+ // bugzilla #208908
+ string eula_txt = sformat ("%1%2/eula.txt", Installation::destdir, Directory::etcdir);
+ if (FileUtils::Exists (eula_txt)) {
+ SCR::Execute (.target.remove, eula_txt);
+ }
+
+ // Copy info.txt so it can be used in firstboot (new eula.txt)
+ if (FileUtils::Exists ("/info.txt"))
+ {
+ SCR::Execute (.target.bash, sformat("/bin/cp /info.txt %1", eula_txt));
+ }
+}
+else
+{
+ y2error ("unknown function: %1", func);
+ ret = nil;
+}
+
+y2debug("ret=%1", ret);
+y2milestone("live_copy_files_finish finished");
+return ret;
+
+
+} /* EOF */
Modified: trunk/live-installer/src/live_doit.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live_doit.ycp?rev=39041&r1=39040&r2=39041&view=diff
==============================================================================
--- trunk/live-installer/src/live_doit.ycp (original)
+++ trunk/live-installer/src/live_doit.ycp Wed Jun 27 10:40:12 2007
@@ -39,7 +39,7 @@
string cmd = sformat ("/bin/cp -avx %1 %2", from, to);
y2milestone ("Executing %1", cmd);
map out = (map)SCR::Execute (.target.bash_output, cmd);
- y2milestone ("Result: %1", out);
+// y2milestone ("Result: %1", out);
return out["exit"]:-1 == 0;
}
@@ -49,9 +49,9 @@
*/
list<string> LinksToCopyList () {
string cmd = sformat ("
- for LINK in `find %1 -type l -xdev` ; do
+ for LINK in `find %1 -xdev -type l` ; do
stat -c \"%%N\" $LINK |grep livecd >/devnull 2>/devnull && echo $LINK;
- done", Installation::destdir);
+ done; exit 0", Installation::destdir);
y2milestone ("Executing %1", cmd);
map out = (map)SCR::Execute (.target.bash_output, cmd);
y2milestone ("Result: %1", out);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org