[yast-commit] r51841 - in /trunk/bootloader: VERSION scripts/update_gfxmenu src/clients/inst_lilo_convert.ycp src/modules/BootCommon.ycp src/modules/BootPOWERLILO.ycp src/routines/misc.ycp
Author: juhliarik Date: Fri Oct 3 17:26:39 2008 New Revision: 51841 URL: http://svn.opensuse.org/viewcvs/yast?rev=51841&view=rev Log: added fixes: * installation of bootloader package * 2 identical section in powerLILO * powerLILO doesn't support disk "by-label" Modified: trunk/bootloader/VERSION trunk/bootloader/scripts/update_gfxmenu trunk/bootloader/src/clients/inst_lilo_convert.ycp trunk/bootloader/src/modules/BootCommon.ycp trunk/bootloader/src/modules/BootPOWERLILO.ycp trunk/bootloader/src/routines/misc.ycp Modified: trunk/bootloader/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/VERSION?rev=51841&r1=51840&r2=51841&view=diff ============================================================================== --- trunk/bootloader/VERSION (original) +++ trunk/bootloader/VERSION Fri Oct 3 17:26:39 2008 @@ -1 +1 @@ -2.17.24 +2.17.25 Modified: trunk/bootloader/scripts/update_gfxmenu URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/scripts/update_gfxmenu?rev=51841&r1=51840&r2=51841&view=diff ============================================================================== --- trunk/bootloader/scripts/update_gfxmenu (original) +++ trunk/bootloader/scripts/update_gfxmenu Fri Oct 3 17:26:39 2008 @@ -30,18 +30,27 @@ || test -f $SRC_DIR/$LOCALE_SHORT.tr && cp $SRC_DIR/$LOCALE_SHORT.tr . test -f $SRC_DIR/$LOCALE.hlp && cp I4/$LOCALE.hlp . \ || test -f $SRC_DIR/$LOCALE_SHORT.hlp && cp $SRC_DIR/$LOCALE_SHORT.hlp . + # set languages to choose -if [ "$LOCALE_SHORT" = "en" ] ; then - echo -n "en -" >languages || exit 6 +if [ -f $SRC_DIR/$LOCALE.tr ]; then + echo -n $LOCALE > languages || exit 6 + + # set translations of bootloaer menu entries + cp $MENU_ENTRIES ./translations.$LOCALE || exit 7; else - echo -n "$LOCALE_SHORT -en -" >languages || exit 6 + if [ "$LOCALE_SHORT" = "en" ]; then + echo -n "en + " >languages || exit 6 + else + echo -n "$LOCALE_SHORT + en + " >languages || exit 6 + fi + + # set translations of bootloaer menu entries + cp $MENU_ENTRIES ./translations.$LOCALE_SHORT || exit 7; fi -# set translations of bootloaer menu entries -cp $MENU_ENTRIES ./translations.$LOCALE_SHORT || exit 7; test -f $SRC_DIR/background.jpg && cp $SRC_DIR/background.jpg back.jpg Modified: trunk/bootloader/src/clients/inst_lilo_convert.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/inst_lilo_convert.ycp?rev=51841&r1=51840&r2=51841&view=diff ============================================================================== --- trunk/bootloader/src/clients/inst_lilo_convert.ycp (original) +++ trunk/bootloader/src/clients/inst_lilo_convert.ycp Fri Oct 3 17:26:39 2008 @@ -121,7 +121,7 @@ boolean checkArch() { boolean ret = false; - if (Arch::x86_64() || Arch::i386() || Arch::ia64()) + if (Arch::x86_64() || Arch::i386()) ret = true; if (ret) Modified: trunk/bootloader/src/modules/BootCommon.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=51841&r1=51840&r2=51841&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootCommon.ycp (original) +++ trunk/bootloader/src/modules/BootCommon.ycp Fri Oct 3 17:26:39 2008 @@ -33,6 +33,7 @@ import "String"; import "Pkg"; import "Popup"; +import "PackagesProposal"; import "Linuxrc"; @@ -1085,6 +1086,8 @@ return loader_type; } + + /** * The function handle selecting and deselecting packages (bootloaders) * @return boolean true on success @@ -1094,18 +1097,12 @@ boolean ret = false; if (globals["trusted_grub"]:"" == "true") { - list <string> packages = ["grub"]; - foreach (string btl, packages, { - if (Pkg::IsSelected(btl)) - { - Pkg::PkgNeutral (btl); - y2milestone("deselect %1 for installation", btl); - ret = true; - } - }); + + PackagesProposal::RemoveResolvables("yast2-bootloader", `package, ["grub"]); + y2milestone("deselect %1 for installation", btl); + ret = true; + } - if (ret) - Pkg::PkgSolve (false); return ret; } @@ -1134,10 +1131,12 @@ && (Linuxrc::InstallInf ("kexec_reboot") != "0")) { bootloader_packages = bootloader_attribs[bootloader, "kexec-tools", "required_packages"]:[]; + bootloader_packages = add(bootloader_packages, "kexec-tools"); } else { bootloader_packages = bootloader_attribs[bootloader, "required_packages"]:[]; } + if (globals["trusted_grub"]:"" == "true") { bootloader_packages = bootloader_attribs[bootloader, "trustedgrub", "required_packages"]:[]; @@ -1146,6 +1145,8 @@ bootloader_packages = add(bootloader_packages, "trustedgrub"); } + //FIXME: solve problem with installing bootloader... + bootloader_packages = add(bootloader_packages, bootloader); // don't configure package manager during autoinstallation preparing if (Mode::normal () && (! (Mode::config () || Mode::repair ()))) @@ -1157,19 +1158,14 @@ { boolean pkg_added = false; foreach (string p, bootloader_packages, { - if (! Pkg::IsSelected (p)) - { - Pkg::PkgInstall (bootloader); - pkg_added = true; - } + y2milestone("Select bootloader package: %1", p); + PackagesProposal::AddResolvables ("yast2-bootloader", `package, [p]); + pkg_added = true; + }); if (pkg_added) { boolean ret = solvePackage(); - // if package was added in inst. proposal, I can't be sure - // that dependencies will be solved - if (ret) - Pkg::PkgSolve (false); } } } Modified: trunk/bootloader/src/modules/BootPOWERLILO.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootPOWERLILO.ycp?rev=51841&r1=51840&r2=51841&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootPOWERLILO.ycp (original) +++ trunk/bootloader/src/modules/BootPOWERLILO.ycp Fri Oct 3 17:26:39 2008 @@ -34,6 +34,7 @@ import "Pkg"; import "Stage"; import "Storage"; +import "GfxMenu"; /* * include ppc specific help messages @@ -458,10 +459,11 @@ map<string,any> ret = $[ "type" : "image", - "name" : title, + "name" : GfxMenu::translateSectionTitle(title, "ppc"), "original_name" : title, "image" : image_fn, "initrd" : initrd_fn, + "optional" : "true", // bnc #217443 "root" : BootCommon::RootPartitionDevice, // "": do not include resume parameter on ppc "append" : BootArch::DefaultKernelParams (""), Modified: trunk/bootloader/src/routines/misc.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/misc.ycp?rev=51841&r1=51840&r2=51841&view=diff ============================================================================== --- trunk/bootloader/src/routines/misc.ycp (original) +++ trunk/bootloader/src/routines/misc.ycp Fri Oct 3 17:26:39 2008 @@ -322,9 +322,13 @@ global map<string,string> remapDeviceMap(map<string,string> device_map) { - symbol by_mount = Storage::GetDefaultMountBy(); - - //symbol by_mount = `id; + symbol by_mount = nil; + if (Arch::ppc()) + by_mount = `id; + else + by_mount = Storage::GetDefaultMountBy(); + + //by_mount = `id; if (by_mount == `label) return device_map; @@ -347,8 +351,13 @@ global map<string,string> remapGlobals(map<string,string> globals_set) { - symbol by_mount = Storage::GetDefaultMountBy(); - //symbol by_mount = `id; + symbol by_mount = nil; + if (Arch::ppc()) + by_mount = `id; + else + by_mount = Storage::GetDefaultMountBy(); + + //by_mount = `id; if (by_mount == `label) return globals_set; @@ -500,8 +509,13 @@ global list<map<string,any> > remapSections(list<map<string,any> >sec) { - symbol by_mount = Storage::GetDefaultMountBy(); - //symbol by_mount = `id; + symbol by_mount = nil; + if (Arch::ppc()) + by_mount = `id; + else + by_mount = Storage::GetDefaultMountBy(); + + //by_mount = `id; if (by_mount == `label) return sec; @@ -556,8 +570,13 @@ y2milestone ("Dev2MountByDev: %1", dev); // (`id,`uuid,`path,`device,`label) - symbol by_mount = Storage::GetDefaultMountBy(); - //symbol by_mount = `id; + symbol by_mount = nil; + if (Arch::ppc()) + by_mount = `id; + else + by_mount = Storage::GetDefaultMountBy(); + + //by_mount = `id; y2milestone("Default mount by is %1", by_mount); map<string,map> devices = (map<string,map>)Storage::GetTargetMap(); @@ -2112,7 +2131,7 @@ if (inst_bootloader) { WFM::Execute(.local.mkdir, Installation::destdir + "/etc/sysconfig"); - WFM::Write(.local.bash, sformat ("touch %1/etc/sysconfig/bootloader", Installation::destdir)); + WFM::Execute(.local.bash, sformat ("touch %1/etc/sysconfig/bootloader", Installation::destdir)); string target_sysconfig_path = Installation::destdir + "/etc/sysconfig/bootloader"; SCR::RegisterAgent (.target.sysconfig.bootloader, `ag_ini( `SysConfigFile(target_sysconfig_path))); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
juhliarik@svn.opensuse.org