[yast-commit] r59865 - in /branches/SuSE-Code-11-SP1-Branch/live-installer: package/yast2-live-installer.changes src/inst_live_doit.ycp src/live-installer.ycp src/live_save_config_finish.ycp
Author: jsrain Date: Mon Nov 30 17:40:39 2009 New Revision: 59865 URL: http://svn.opensuse.org/viewcvs/yast?rev=59865&view=rev Log: backported from trunk Modified: branches/SuSE-Code-11-SP1-Branch/live-installer/package/yast2-live-installer.changes branches/SuSE-Code-11-SP1-Branch/live-installer/src/inst_live_doit.ycp branches/SuSE-Code-11-SP1-Branch/live-installer/src/live-installer.ycp branches/SuSE-Code-11-SP1-Branch/live-installer/src/live_save_config_finish.ycp Modified: branches/SuSE-Code-11-SP1-Branch/live-installer/package/yast2-live-installer.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/live-installer/package/yast2-live-installer.changes?rev=59865&r1=59864&r2=59865&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/live-installer/package/yast2-live-installer.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/live-installer/package/yast2-live-installer.changes Mon Nov 30 17:40:39 2009 @@ -1,6 +1,9 @@ ------------------------------------------------------------------- -Thu Jun 11 13:40:23 CEST 2009 - jsrain@suse.cz +Mon Nov 30 17:34:35 CET 2009 - jsrain@suse.cz +- call correct_live_for_reboot script before reboot (bnc#550874) +- enhanced error reporting (bnc#533601) +- fixed calling the workflow modules (bnc#532502) - disable all repos before installation, reenable afterwards (bnc #450228) - adapted for unified progress during live installation Modified: branches/SuSE-Code-11-SP1-Branch/live-installer/src/inst_live_doit.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/live-installer/src/inst_live_doit.ycp?rev=59865&r1=59864&r2=59865&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/live-installer/src/inst_live_doit.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/live-installer/src/inst_live_doit.ycp Mon Nov 30 17:40:39 2009 @@ -12,6 +12,7 @@ import "ImageInstallation"; import "LiveInstaller"; import "SlideShow"; +import "Report"; Installation::destdir = "/mnt"; @@ -71,6 +72,7 @@ } integer index = 0; integer progress_step = (100-progress_start) * index / size (symlinks); + boolean ret = true; foreach (string link, string target, symlinks, { index = index + 1; SlideShow::StageProgress( progress_start, nil); @@ -90,13 +92,13 @@ link = mergestring (components, "/"); */ integer progress_done = progress_start + progress_step; - ImageInstallation::FileSystemCopy ("/" + target, sformat ("%1/%2", Installation::destdir, link), progress_start, progress_done); + ret = ImageInstallation::FileSystemCopy ("/" + target, sformat ("%1/%2", Installation::destdir, link), progress_start, progress_done) && ret; progress_start = progress_done; // Progress::Step (progress_start); SlideShow::StageProgress( progress_done, nil); SlideShow::SubProgress( 100, nil); }); - return true; + return ret; } /** @@ -106,9 +108,9 @@ boolean CopyRootImage (integer progress_start, integer progress_finish) { string tmpdir = (string)SCR::Read (.target.tmpdir); SCR::Execute (.target.bash, sformat ("/bin/cp -a %1/etc %2", Installation::destdir, tmpdir)); - ImageInstallation::FileSystemCopy ("/", Installation::destdir, progress_start, progress_finish); + boolean ret = ImageInstallation::FileSystemCopy ("/", Installation::destdir, progress_start, progress_finish); SCR::Execute (.target.bash, sformat ("/bin/cp -a %1/etc %2", tmpdir, Installation::destdir)); - return true; + return ret; } /* Progress::New( @@ -141,9 +143,19 @@ integer steps = size (copy_map) + 1; integer step_size = 95 / steps; -CopyRootImage (5, 5 + step_size); +if (! CopyRootImage (5, 5 + step_size)) +{ + // error report + Report::Error (_("Copying the live image to hard disk failed.")); + return `abort; +} //Progress::NextStageStep (10); -CopySymlinkedImage (copy_map, 5 + step_size); +if (! CopySymlinkedImage (copy_map, 5 + step_size)) +{ + // error report + Report::Error (_("Copying the live image to hard disk failed.")); + return `abort; +} //Progress::Finish(); //Progress::Title (_("Finished.")); Modified: branches/SuSE-Code-11-SP1-Branch/live-installer/src/live-installer.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/live-installer/src/live-installer.ycp?rev=59865&r1=59864&r2=59865&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/live-installer/src/live-installer.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/live-installer/src/live-installer.ycp Mon Nov 30 17:40:39 2009 @@ -18,8 +18,6 @@ import "CommandLine"; import "Popup"; - string live_control_file = "/etc/YaST2/control-live.xml"; - // Bugzilla #269890, CommanLine "support" // argmap is only a map, CommandLine uses string parameters if (size (WFM::Args()) > 0) { @@ -31,9 +29,8 @@ } Wizard::OpenNextBackStepsDialog(); - - if ($[] != (map)SCR::Read (.target.stat, live_control_file)) { - ProductControl::custom_control_file = live_control_file; + if ($[] != (map)SCR::Read (.target.stat, LiveInstaller::live_control_file)) { + ProductControl::custom_control_file = LiveInstaller::live_control_file; // replace general control file because of 2nd stage integer cpres = (integer)SCR::Execute (.target.bash, sformat ("/bin/cp %1 %2", live_control_file, "/etc/YaST2/control.xml")); if (cpres != 0) Modified: branches/SuSE-Code-11-SP1-Branch/live-installer/src/live_save_config_finish.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/live-installer/src/live_save_config_finish.ycp?rev=59865&r1=59864&r2=59865&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/live-installer/src/live_save_config_finish.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/live-installer/src/live_save_config_finish.ycp Mon Nov 30 17:40:39 2009 @@ -21,6 +21,7 @@ import "Keyboard"; import "Installation"; import "Language"; +import "FileUtils"; any ret = nil; string func = ""; @@ -64,6 +65,23 @@ Progress::Title (_("Saving time zone...")); Timezone::Save(); + // bnc#550874 + // Call a script if it exists + string scriptname = "/usr/bin/correct_live_for_reboot"; + if (FileUtils::Exists (scriptname)) { + y2milestone ("Calling %1 returned %2", + scriptname, + SCR::Execute (.target.bash_output, scriptname) + ); + y2milestone ("Removing %1 returned %2", + scriptname, + SCR::Execute (.target.bash_output, sformat ("/bin/rm %1", scriptname)) + ); + } else { + y2milestone ("Script %1 doesn't exist, skipping...", scriptname); + } + + } else { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsrain@svn.opensuse.org