[yast-commit] r67562 - in /trunk/bootloader: ./ package/ src/ src/modules/ src/routines/
Author: snwint Date: Mon Mar 5 14:48:47 2012 New Revision: 67562 URL: http://svn.opensuse.org/viewcvs/yast?rev=67562&view=rev Log: - add basic grub2 support that only handles installs - 2.23.0 Modified: trunk/bootloader/VERSION trunk/bootloader/package/yast2-bootloader.changes trunk/bootloader/src/Makefile.am trunk/bootloader/src/modules/BootCommon.ycp trunk/bootloader/src/modules/BootSupportCheck.ycp trunk/bootloader/src/modules/Makefile.am trunk/bootloader/src/routines/dialogs.ycp trunk/bootloader/src/routines/global_widgets.ycp trunk/bootloader/src/routines/switcher.ycp Modified: trunk/bootloader/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/VERSION?rev=67562&r1=6... ============================================================================== --- trunk/bootloader/VERSION (original) +++ trunk/bootloader/VERSION Mon Mar 5 14:48:47 2012 @@ -1 +1 @@ -2.22.0 +2.23.0 Modified: trunk/bootloader/package/yast2-bootloader.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootload... ============================================================================== --- trunk/bootloader/package/yast2-bootloader.changes (original) +++ trunk/bootloader/package/yast2-bootloader.changes Mon Mar 5 14:48:47 2012 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Mar 5 14:42:10 CET 2012 - mchang@suse.com + +- add basic grub2 support that only handles installs +- 2.23.0 + +------------------------------------------------------------------- Fri Jan 13 11:31:51 CET 2012 - jsuchome@suse.cz - added GfxMenu::Update to the client, so calling does not require Modified: trunk/bootloader/src/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/Makefile.am?rev=67... ============================================================================== --- trunk/bootloader/src/Makefile.am (original) +++ trunk/bootloader/src/Makefile.am Mon Mar 5 14:48:47 2012 @@ -1 +1 @@ -SUBDIRS = routines modules lilo grub elilo ppc zipl config clients +SUBDIRS = routines modules lilo grub grub2 elilo ppc zipl config clients Modified: trunk/bootloader/src/modules/BootCommon.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon... ============================================================================== --- trunk/bootloader/src/modules/BootCommon.ycp (original) +++ trunk/bootloader/src/modules/BootCommon.ycp Mon Mar 5 14:48:47 2012 @@ -187,7 +187,7 @@ /** * type of bootloader to configure/being configured - * shall be one of "lilo", "grub", "elilo", "ppc", "zipl" + * shall be one of "lilo", "grub", "elilo", "ppc", "zipl", "grub2" */ string loader_type = nil; @@ -289,7 +289,7 @@ * List of all supported bootloaders */ global list<string> bootloaders = ["lilo", "grub", "elilo", - "zipl", "ppc"]; + "zipl", "ppc", "grub2"]; /** FATE#305008: Failover boot configurations for md arrays with redundancy * if true enable redundancy for md array @@ -589,7 +589,7 @@ "sections" : remapSections(sections), "device_map" : BootStorage::remapDeviceMap(BootStorage::device_mapping), ]; - if ( ! ( loader_type == "grub" ) ) { + if ( ! ( loader_type == "grub" || loader_type == "grub2" ) ) { exp["repl_mbr"] = repl_mbr; exp["activate"] = activate; } @@ -609,7 +609,7 @@ // FIXME: for grub, repl_mbr is replaced by globals["generic_mbr"]; same // for activate; remove the following when no bootloader uses these // variables any more - if ( ! ( loader_type == "grub" ) ) { + if ( ! ( loader_type == "grub" || loader_type == "grub2" ) ) { repl_mbr = settings["repl_mbr"]:false; activate = settings["activate"]:false; } @@ -1043,6 +1043,9 @@ loader_type = (string)SCR::Read (.probe.boot_arch); if (loader_type == "s390") loader_type = "zipl"; + // suppose grub2 should superscede grub .. + if (loader_type == "grub") + loader_type = "grub2"; y2milestone ("Bootloader detection returned %1", loader_type); // lslezak@: Arch::is_xenU() returns true only in PV guest if (Arch::is_uml () || Arch::is_xenU()) @@ -1136,7 +1139,7 @@ global define list<string> getBootloaders () { if (Mode::config ()) { - return ["grub", "lilo", "elilo", "zipl", "ppc", "default", "none"]; + return ["grub", "lilo", "elilo", "zipl", "ppc", "grub2", "default", "none"]; } list<string> ret = [ getLoaderType (false), @@ -1144,7 +1147,7 @@ ]; if (Arch::i386 () || Arch::x86_64 ()) { - ret = (list<string>)merge (ret, ["lilo", "grub"]); + ret = (list<string>)merge (ret, ["lilo", "grub", "grub2"]); if (Arch::x86_64 ()) ret = (list<string>)merge (ret, ["elilo"]); } Modified: trunk/bootloader/src/modules/BootSupportCheck.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootSuppor... ============================================================================== --- trunk/bootloader/src/modules/BootSupportCheck.ycp (original) +++ trunk/bootloader/src/modules/BootSupportCheck.ycp Mon Mar 5 14:48:47 2012 @@ -74,7 +74,7 @@ * Check that bootloader is known and supported */ boolean KnownLoader () { - if (! contains (["grub", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) + if (! contains (["grub", "grub2", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) { if (Bootloader::getLoaderType () != "lilo") @@ -125,7 +125,7 @@ if (lt == "elilo") return true; } else { - if ((lt == "grub") || (lt == "lilo")) + if ((lt == "grub") || (lt == "lilo") || (lt == "grub2")) return true; } } @@ -297,6 +297,13 @@ } /** + * GRUB2-related check + */ +global boolean GRUB2 () { + return GRUB(); +} + +/** * ELILO related check */ boolean ELILO () { @@ -348,6 +355,8 @@ supported = PPC () && supported; else if (lt == "zipl") supported = ZIPL () && supported; + else if (lt == "grub2") + supported = GRUB2 () && supported; y2milestone ("Configuration supported: %1", supported); return supported; Modified: trunk/bootloader/src/modules/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Makefile.a... ============================================================================== --- trunk/bootloader/src/modules/Makefile.am (original) +++ trunk/bootloader/src/modules/Makefile.am Mon Mar 5 14:48:47 2012 @@ -11,6 +11,7 @@ BootArch.ycp \ BootELILO.ycp \ BootGRUB.ycp \ + BootGRUB2.ycp \ BootLILO.ycp \ BootPOWERLILO.ycp \ BootZIPL.ycp \ Modified: trunk/bootloader/src/routines/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/dialogs.y... ============================================================================== --- trunk/bootloader/src/routines/dialogs.ycp (original) +++ trunk/bootloader/src/routines/dialogs.ycp Mon Mar 5 14:48:47 2012 @@ -81,9 +81,12 @@ */ symbol MainDialog () { y2milestone ("Running Main Dialog"); + string lt = Bootloader::getLoaderType (); term contents = `VBox ( - "tab", - `Right ("adv_button") + "tab", + (lt == "grub2") + ? nil + : `Right ("adv_button") ); // F#300779 - Install diskless client (NFS-root) @@ -98,15 +101,22 @@ } // F#300779: end - list<string> widget_names = ["tab", "adv_button"]; + list<string> widget_names = (lt == "grub2") + ? ["tab"] + : ["tab", "adv_button"]; map<string,map<string,any> > widget_descr = $[]; + widget_descr = (map<string,map<string,any> >) union (CommonGlobalWidgets (), Bootloader::blWidgetMaps ()); widget_descr["tab"] = CWMTab::CreateWidget($[ - "tab_order": ["sections", "installation"], - "tabs": TabsDescr (), - "widget_descr": widget_descr, - "initial_tab" : return_tab, + "tab_order": (lt == "grub2") + ? ["installation"] + : ["sections", "installation"], + "tabs": TabsDescr (), + "widget_descr": widget_descr, + "initial_tab" : (lt == "grub2") + ? "installation" + : return_tab ]); widget_descr["tab", "no_help"] = ""; Modified: trunk/bootloader/src/routines/global_widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/global_wi... ============================================================================== --- trunk/bootloader/src/routines/global_widgets.ycp (original) +++ trunk/bootloader/src/routines/global_widgets.ycp Mon Mar 5 14:48:47 2012 @@ -314,6 +314,22 @@ return `redraw; } + if (new_bl == "grub2") { + if (Popup::ContinueCancel (_(" +The GRUB2 is still under develope and test. + +Proceed? +"))) + { + BootCommon::other_bl[old_bl] = Bootloader::Export (); + BootCommon::setLoaderType ("grub2"); + Bootloader::Propose (); + BootCommon::location_changed = true; + BootCommon::changed = true; + } + return `redraw; + } + if (Arch::x86_64 ()) { if (new_bl == "elilo") { // continue/cancel pop-up @@ -704,7 +720,7 @@ `HStretch (), `VBox ( `Label (""), - (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo") + (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2") ? `Empty() : "loader_options" ), `HSpacing (2) @@ -721,8 +737,8 @@ : "inst_details", `VStretch () ), `HStretch ()), - "widget_names": (lt == "none" || lt == "default" || lt=="zipl") - ? [ "loader_type", "loader_options"] + "widget_names": (lt == "none" || lt == "default" || lt=="zipl" || lt == "grub2") + ? [ "loader_type", "loader_options", "loader_location"] : [ "loader_type", "loader_options", "loader_location", "inst_details"] ], Modified: trunk/bootloader/src/routines/switcher.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/switcher.... ============================================================================== --- trunk/bootloader/src/routines/switcher.ycp (original) +++ trunk/bootloader/src/routines/switcher.ycp Mon Mar 5 14:48:47 2012 @@ -23,6 +23,7 @@ import "BootLILO"; import "BootPOWERLILO"; import "BootZIPL"; +import "BootGRUB2"; import "BootCommon"; /** @@ -38,7 +39,8 @@ "grub" : BootGRUB::GetFunctions, "elilo" : BootELILO::GetFunctions, "zipl" : BootZIPL::GetFunctions, - "ppc" : BootPOWERLILO::GetFunctions + "ppc" : BootPOWERLILO::GetFunctions, + "grub2" : BootGRUB2::GetFunctions ]; map<string,any> () gf = (map<string,any>())(bl_functions[bootloader]:nil); if (gf == nil) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
snwint@svn2.opensuse.org