Author: jsuchome Date: Thu Nov 6 12:54:08 2008 New Revision: 52975 URL: http://svn.opensuse.org/viewcvs/yast?rev=52975&view=rev Log: - added "Boot Installed System" option to Repair Tools (bnc#441188) (copied from inst_mode.ycp of 10.3) - 2.17.6 Modified: trunk/repair/VERSION trunk/repair/package/yast2-repair.changes trunk/repair/src/OSRRepairUI.ycp trunk/repair/src/inst_repair.ycp trunk/repair/src/osr_module_partition.ycp trunk/repair/yast2-repair.spec.in Modified: trunk/repair/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/VERSION?rev=52975&r1=52974&r2=52975&view=diff ============================================================================== --- trunk/repair/VERSION (original) +++ trunk/repair/VERSION Thu Nov 6 12:54:08 2008 @@ -1 +1 @@ -2.17.5 +2.17.6 Modified: trunk/repair/package/yast2-repair.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/package/yast2-repair.changes?rev=52975&r1=52974&r2=52975&view=diff ============================================================================== --- trunk/repair/package/yast2-repair.changes (original) +++ trunk/repair/package/yast2-repair.changes Thu Nov 6 12:54:08 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Nov 6 11:05:56 CET 2008 - jsuchome@suse.cz + +- added "Boot Installed System" option to Repair Tools (bnc#441188) + (copied from inst_mode.ycp of 10.3) +- 2.17.6 + +------------------------------------------------------------------- Wed Oct 15 10:42:53 CEST 2008 - jsuchome@suse.cz - fixed failing testsuite (Storage.ycp) Modified: trunk/repair/src/OSRRepairUI.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/src/OSRRepairUI.ycp?rev=52975&r1=52974&r2=52975&view=diff ============================================================================== --- trunk/repair/src/OSRRepairUI.ycp (original) +++ trunk/repair/src/OSRRepairUI.ycp Thu Nov 6 12:54:08 2008 @@ -579,6 +579,10 @@ // get a abort return from custom_part or a other tool if ( rret == `abort ) return `really_abort; + + // finish yast to boot selected partition + if (rret == `boot) + return `boot; } } until ( ret == `next || ret == `abort || ret == `back || ret == `cancel); @@ -880,7 +884,8 @@ `really_abort : `abort, `next : "start", `error : `error, - `cancel : "abort" + `cancel : "abort", + `boot : `boot, ], "detect" : $[ `abort : `abort, Modified: trunk/repair/src/inst_repair.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/src/inst_repair.ycp?rev=52975&r1=52974&r2=52975&view=diff ============================================================================== --- trunk/repair/src/inst_repair.ycp (original) +++ trunk/repair/src/inst_repair.ycp Thu Nov 6 12:54:08 2008 @@ -32,7 +32,15 @@ any ret = WFM::CallFunction ("repair"); - Linuxrc::WriteYaSTInf($["Root" : "reboot", "RebootMsg" : "0"]); + if (ret != `boot) + { + Linuxrc::WriteYaSTInf($["Root" : "reboot", "RebootMsg" : "0"]); + } + else + { + y2milestone ("booting to existing system..."); + } + Wizard::CloseDialog(); Modified: trunk/repair/src/osr_module_partition.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/src/osr_module_partition.ycp?rev=52975&r1=52974&r2=52975&view=diff ============================================================================== --- trunk/repair/src/osr_module_partition.ycp (original) +++ trunk/repair/src/osr_module_partition.ycp Thu Nov 6 12:54:08 2008 @@ -17,6 +17,7 @@ { import "FileSystems"; import "Label"; + import "Linuxrc"; import "Mode"; import "OSR"; import "OSRCommon"; @@ -34,8 +35,11 @@ import "Partitions"; import "Popup"; import "Report"; + import "RootPart"; import "Stage"; import "Storage"; + import "Update"; + textdomain "repair"; @@ -1289,6 +1293,69 @@ return `ok; } + /** + * Boot into installed system (hack for fixing bnc#441188) + * Ehm, this function is copied from handle_boot() of + http://svn.opensuse.org/svn/yast/branches/SuSE-Linux-10_3-Branch/installatio... + * so some parts of it may not be necessary + */ + define symbol OSRDirectBootInstalledSystem () { + + y2milestone( "User wishes to boot installed system" ); + + if (!RootPart::didSearchForRootPartitions) + { + UI::OpenDialog (`opt(`decorated ), + // label + `Label(_("Evaluating root partition. One moment please...")) + ); + RootPart::FindRootPartitions (); + UI::CloseDialog (); + } + + if (RootPart::numberOfValidRootPartitions == 0) + { + // a popup + Popup::Message(_("No Linux root partition found.")); + return `cancel; + } + + // We must only change RootPart::selectedRootPartition if booting + // is inevitable. + + if (RootPart::numberOfValidRootPartitions == 1) + { + RootPart::SetSelectedToValid (); + } + else + { + if (WFM::CallFunction ("inst_rootpart", [true, true, `boot_popup]) != `next) + return `cancel; + } + + string root_part = RootPart::selectedRootPartition; + + y2milestone ("selected root_part %1", root_part); + + UI::OpenDialog( `opt(`decorated), + // Information popup: Inform user what partition + // will be booted from after user selected + // "Boot installed system" + `Label( sformat(_("Booting from %1"), root_part ) ) ); + + Update::Detach (); + RootPart::UnmountPartitions (false); + + sleep (1000); + + Linuxrc::WriteYaSTInf ($["Root" : root_part]); + Storage::ActivateHld(true); + + UI::CloseDialog (); + + return `boot; + } + ////////////////////////////////////////////////////////////////////// // // METHODS @@ -1622,7 +1689,17 @@ "method" : OSRDirectSave2Floppy, "initial_only" : false, "visible" : true - ] + ], + $[ + "name" : "direct_methods_boot", + // module method action label + "button_text" : _("Boot Installed System"), + // module method description + "description" : _("Try to boot into one of the installed Linux systems."), + "method" : OSRDirectBootInstalledSystem, + "initial_only" : true, + "visible" : true + ], ] ]; Modified: trunk/repair/yast2-repair.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/yast2-repair.spec.in?rev=52975&r1=52974&r2=52975&view=diff ============================================================================== --- trunk/repair/yast2-repair.spec.in (original) +++ trunk/repair/yast2-repair.spec.in Thu Nov 6 12:54:08 2008 @@ -1,8 +1,8 @@ @HEADER-COMMENT@ @HEADER@ -BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2 yast2-bootloader yast2-testsuite yast2-packager yast2-storage -Requires: yast2 gpart reiserfs e2fsprogs yast2-bootloader yast2-storage +BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2 yast2-bootloader yast2-testsuite yast2-packager yast2-storage yast2-update +Requires: yast2 gpart reiserfs e2fsprogs yast2-bootloader yast2-storage yast2-update BuildArchitectures: noarch -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org