Author: odabrunz Date: Mon Sep 24 21:25:21 2007 New Revision: 41067 URL: http://svn.opensuse.org/viewcvs/yast?rev=41067&view=rev Log: - Storage::GetTranslatedDevices() called often and uneccesarily (related to #304269): - added more logging to UpdateSections() - added comments and FIXMEs - disabled calling device name update again for "linux", "failsafe" and "initrd" sections: this is not needed and would reverse device name updates when forwards and backwards device name update mappings exist - enabled device name updates for "other" sections (booting other installations) - (related to #326372, see comment #12) - fix "Interpreter" error: also activates persistent device translation for device.map in yast2-bootloader (but no disk device mappings are defined in yast2-storage, so devices remain untranslated as of now) Modified: trunk/bootloader/src/modules/BootCommon.ycp trunk/bootloader/src/routines/lilolike.ycp Modified: trunk/bootloader/src/modules/BootCommon.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=41067&r1=41066&r2=41067&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootCommon.ycp (original) +++ trunk/bootloader/src/modules/BootCommon.ycp Mon Sep 24 21:25:21 2007 @@ -313,8 +313,9 @@ /** * Types of sections that should be updated (changed device names) */ -global list<string> update_section_types - = [ "linux", "failsafe", "initrd", "floppy" ]; + // FIXME: see FIXME in lilolike.ycp:899 +global list<string> update_section_types = [ "floppy", "other" ]; +// = [ "linux", "failsafe", "initrd", "floppy" ]; /** * List of all supported bootloaders @@ -634,7 +635,7 @@ }); // convert device names in device map to the kernel device names - map<string,string> device_mapping = + device_mapping = mapmap (string k , string v, device_mapping, { return $[BootCommon::MountByDev2Dev(k) : v]; }); Modified: trunk/bootloader/src/routines/lilolike.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/lilolike.ycp?rev=41067&r1=41066&r2=41067&view=diff ============================================================================== --- trunk/bootloader/src/routines/lilolike.ycp (original) +++ trunk/bootloader/src/routines/lilolike.ycp Mon Sep 24 21:25:21 2007 @@ -736,6 +736,7 @@ f_changed = true; if (replace && m != $[]) { + y2milestone ("Recreated section %1: %2", label, m); recreated = add (recreated, label); return m; } @@ -766,6 +767,7 @@ // prepend or append the section created by create_linux_section() if (! f_changed && m != $[]) { + y2milestone ("Recreated section: %1", m); recreated = add (recreated, m["name"]:""); if (t == "linux") out = prepend (out, m); @@ -773,6 +775,7 @@ out = add (out, m); } }); + y2milestone ("All recreated sections: %1", recreated); // for grub and replace-mode only: // convert sections that boot "other" installations (another Linux, Windows @@ -889,7 +892,16 @@ y2milestone ("... to %1", s["name"]:""); } + // Update device names in sections for certain section types, if the + // section has not been recreated anyway + // FIXME: never update device names twice! foreach (string key, ["root", "chainloader"], { + // FIXME: for some reason, this used to update "linux" and + // "failsafe" even if they have been recreated; but "other" + // sections were never updated -- since there are no calls to + // UpdateSections() with replace == false, ATM we disable updating + // "linux" and "failsafe", and add "other", seed + // BootCommon::update_section_types if ((contains (update_section_types, type) && ! contains (recreated, label)) || key == "chainloader") -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org