Author: jreidinger
Date: Tue May 5 15:25:33 2009
New Revision: 57070
URL: http://svn.opensuse.org/viewcvs/yast?rev=57070&view=rev
Log:
huge backport thinks to SP3, more details in changelog
Added:
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootSupportCheck.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader_API.pm
Modified:
branches/SuSE-SLE-10-SP3-Branch/bootloader/ (props changed)
branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER
branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs
branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes
branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/ (props changed)
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/ (props changed)
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootELILO.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootLILO.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootZIPL.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/GfxMenu.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Makefile.am
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/autoinstall.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/global_widgets.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/helps_i386.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/i386.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lib_iface.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/section_widgets.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/switcher.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/wizards.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/zipl/ (props changed)
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER Tue May 5 15:25:33 2009
@@ -1 +1 @@
-Olaf Dabrunz
+Jozef Uhliarik
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs Tue May 5 15:25:33 2009
@@ -4,8 +4,10 @@
LIB = $(shell y2tool get-lib)
+PREFIX = /usr
+
configure: all
- ./configure --libdir=/usr/$(LIB)
+ ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
all:
y2tool y2autoconf
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes Tue May 5 15:25:33 2009
@@ -1,4 +1,23 @@
-------------------------------------------------------------------
+Tue May 5 14:38:32 CEST 2009 - jreidinger@suse.cz
+
+- backport UEFI support and backport xen support for ELILO
+ (FATE#306032)
+- Cloning section fix backported (bnc#450190)
+- Backport selecting correct translation (bnc#384768)
+- Backport fix for non-selected boot location in autoyast profile
+ (bnc#439674)
+- Backport fix for correct marking section as modified (bnc#432651)
+- Backport fix for proposal with more kernels (bnc#380781)
+- Backport fix reducinf device map to 8 device (bnc#494630)
+- Backport editing efi label (bnc#450682,bnc##269198,bnc##438215)
+- Backport not translating label for ELILO (bnc##151486)
+- Backport some software raid fixes (bnc#341309,bnc#350992)
+- Backport fix for fail on thinkpad, now only store thinkpad MBR
+ and propose overwrite, as for new types it doesn't work properly
+ (bnc#464485)
+
+-------------------------------------------------------------------
Fri Apr 10 10:54:59 CEST 2009 - juhliarik@suse.cz
- added fix for problem with worng handling content of MBR
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu Tue May 5 15:25:33 2009
@@ -30,18 +30,36 @@
|| 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 "$LOCALE" > languages || exit 6
+ # always add also en_US
+ if [ "$LOCALE" != "en_US" ]; then
+ echo "en_US" >>languages || exit 6
+ fi
+ # set translations of bootloaer menu entries
+ cp $MENU_ENTRIES ./translations.$LOCALE || exit 7;
else
- echo -n "$LOCALE_SHORT
-en
-" >languages || exit 6
+ if [ -f $SRC_DIR/$LOCALE_SHORT.tr ]; then
+ echo "$LOCALE" > languages || exit 6
+ # always add also en_US
+ if [ "$LOCALE" != "en_US" ]; then
+ echo "en_US" >>languages || exit 6
+ fi
+ else
+
+ if [ "$LOCALE_SHORT" = "en" ]; then
+ echo "en_US" >languages || exit 6
+ else
+ echo "$LOCALE_SHORT" >languages || exit 6
+ fi
+ 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: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp Tue May 5 15:25:33 2009
@@ -17,6 +17,7 @@
import "Bootloader";
import "Storage";
import "Mode";
+ import "BootSupportCheck";
include "bootloader/routines/wizards.ycp";
@@ -51,7 +52,7 @@
// changes relevant to the yast2-bootloader settings are made
// through Storage, so the change time of Storage data should be
// sufficient.
- && Bootloader::cached_settings_base_data_change_time == Storage::GetTargetChangeTime())
+ && BootCommon::cached_settings_base_data_change_time == Storage::GetTargetChangeTime())
// FIXME: has the software selection changed?: esp. has the
@@ -84,8 +85,13 @@
if (Bootloader::getLoaderType () == "grub")
{
import "BootGRUB";
+ // merge_level == `main means: merge only the "default" key(s?) of
+ // a "foreign" grub configuration from a different configuration
+ // into our configuration
BootGRUB::merge_level = `main;
Bootloader::Propose ();
+
+
BootGRUB::merge_level = `none;
}
else
@@ -164,9 +170,21 @@
}
}
+ if (!BootSupportCheck::SystemSupported())
+ {
+ ret = (map)
+ union(ret,
+ $[
+ "warning_level" : `error,
+ "warning" : BootSupportCheck::StringProblems(),
+ "raw_proposal" : Bootloader::Summary (),
+ ]);
+
+ }
+
// cache the values
Bootloader::cached_settings = Bootloader::Export();
- Bootloader::cached_settings_base_data_change_time = Storage::GetTargetChangeTime();
+ BootCommon::cached_settings_base_data_change_time = Storage::GetTargetChangeTime();
Bootloader::cached_proposal = ret;
}
// This is a request to start some dialog and interact with the user to set
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc Tue May 5 15:25:33 2009
@@ -85,6 +85,8 @@
element sectors {text}? &
element blockoffset {text}? &
element vgamode {text}? &
+ element xen {text}? &
+ element xen_append {text}? &
element noverifyroot { "true" | "false" }? &
element image {text}?
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am Tue May 5 15:25:33 2009
@@ -14,7 +14,8 @@
section_widgets.ycp \
sections_widget.ycp \
widget_funcs.ycp \
- wizards.ycp
+ wizards.ycp \
+ device_map_edit_widget.ycp
EXTRA_DIST = \
$(ynclude_DATA)
Added: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp?rev=57070&view=auto
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp (added)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp Tue May 5 15:25:33 2009
@@ -0,0 +1,184 @@
+/**
+ * File:
+ * include/bootloader/routines/dialogs.ycp
+ *
+ * Module:
+ * Bootloader installation and configuration
+ *
+ * Summary:
+ * Dialogs for configuraion i386-specific functions
+ *
+ * Authors:
+ * Jiri Srain
+ *
+ * $Id: dialogs_i386.ycp 47885 2008-05-26 16:34:24Z juhliarik $
+ *
+ */
+
+
+{
+textdomain "bootloader";
+
+
+import "Label";
+import "Wizard";
+import "CWM";
+import "BootCommon";
+import "Stage";
+
+include "bootloader/routines/helps_i386.ycp";
+
+
+/**
+ * Run dialog to adjust installation on i386 and AMD64
+ * @return symbol for wizard sequencer
+ */
+symbol i386InstallDetailsDialog () {
+ term contents = `HBox (`HStretch (), `VBox (
+ `VStretch (),
+ // frame
+ `Frame (_("Disk Order"),
+ `HBox (`HSpacing (2), `VBox (
+ `VSpacing (1),
+ `SelectionBox (`id (`disks),
+ `opt (`notify, `immediate),
+ // selectionn box label
+ _("D&isks"), []),
+ (Mode::config () || Mode::installation())
+ ? `HBox (
+ `HStretch (),
+ `PushButton (`id (`add), `opt (`key_F3), Label::AddButton ()),
+ `PushButton (`id (`delete), `opt(`key_F5), Label::DeleteButton ()),
+ `HStretch ()
+ )
+ : `HBox (),
+ `VSpacing (1)
+ ),
+ `HSquash (
+ `VBox (
+ `VStretch (),
+ `PushButton (`id (`up), `opt (`hstretch), _("&Up")),
+ `PushButton (`id (`down), `opt (`hstretch), _("&Down")),
+ `VStretch ()
+ )
+ ),
+ `HSpacing (2)
+ )
+ ),
+ `VStretch ()
+
+ ), `HStretch ());
+
+ Wizard::SetContentsButtons (
+ // dialog caption
+ _("Boot Loader Device Map"),
+ contents,
+ i386DeviceMapEditHelp(),
+ Label::BackButton (),
+ Label::OKButton ());
+
+ list<string> disks_order = BootCommon::DisksOrder ();
+
+ UI::ChangeWidget (`id (`disks), `Items, disks_order);
+ UI::ChangeWidget (`id (`disks), `CurrentItem, disks_order[0]:"");
+
+ any ret = nil;
+ while (ret == nil)
+ {
+ string current = (string)UI::QueryWidget (`id (`disks), `CurrentItem);
+ integer pos = 0;
+ while (pos < size (disks_order) && disks_order[pos]:"" != current)
+ pos = pos + 1;
+ UI::ChangeWidget (`id (`up), `Enabled,
+ pos > 0 && pos < size (disks_order));
+ UI::ChangeWidget (`id (`down), `Enabled, pos < size (disks_order) - 1);
+
+ ret = UI::UserInput ();
+ boolean order_changed = false;
+
+ if (ret == `add)
+ {
+ term popup = `VBox (`VSpacing (1),
+ // textentry header
+ `InputField (`id (`devname), `opt (`hstretch), _("&Device")),
+ `VSpacing (1),
+ `HBox (`HStretch (),
+ `PushButton (`id (`ok), `opt (`key_F10, `default),
+ Label::OKButton ()),
+ `HStretch (),
+ `PushButton (`id (`cancel), `opt (`key_F8),
+ Label::CancelButton ()),
+ `HStretch ()
+ ),
+ `VSpacing (1)
+ );
+ UI::OpenDialog (popup);
+ symbol pushed = (symbol)UI::UserInput ();
+ string new_dev = (string)
+ UI::QueryWidget (`id (`devname), `Value);
+ UI::CloseDialog ();
+ if (pushed == `ok)
+ {
+ disks_order = add (disks_order, new_dev);
+ order_changed = true;
+ current = new_dev;
+ }
+ }
+ else if (ret == `delete)
+ {
+ disks_order = filter (string d, disks_order, {
+ return d != current;
+ });
+ order_changed = true;
+ current = disks_order[0]:nil;
+ }
+ else if (ret == `up)
+ {
+ disks_order = (list<string>)
+ BootCommon::swapItems (disks_order, pos, pos - 1);
+ order_changed = true;
+ }
+ else if (ret == `down)
+ {
+ disks_order = (list<string>)
+ BootCommon::swapItems (disks_order, pos, pos + 1);
+ order_changed = true;
+ }
+
+ if (ret == `cancel)
+ ret = `abort;
+ if (ret != `next && ret != `abort && ret != `back)
+ {
+ if (order_changed)
+ {
+ UI::ChangeWidget (`id (`disks), `Items, disks_order);
+ UI::ChangeWidget (`id (`disks), `CurrentItem, current);
+ }
+ ret = nil;
+ }
+ }
+ if (ret == `next)
+ {
+ integer index = 0;
+ BootCommon::device_mapping = filter (string k, string v,
+ BootCommon::device_mapping,
+ {
+ return substring (v, 0, 2) != "hd";
+ });
+ BootCommon::mbrDisk = disks_order[0]:"";
+ BootCommon::device_mapping = (map)union (
+ BootCommon::device_mapping,
+ listmap (string d, disks_order, {
+ string hex_index = substring (tohexstring (index), 2);
+ index = index + 1;
+ return $[ d : sformat ("hd%1", hex_index) ];
+ })
+ );
+ BootCommon::location_changed = true;
+ }
+ return (symbol)ret;
+}
+
+
+
+} // EOF
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp Tue May 5 15:25:33 2009
@@ -10,6 +10,7 @@
*
* Authors:
* Joachim Plack
+ * Olaf Dabrunz
*
* $Id$
*
@@ -49,6 +50,10 @@
global void importMetaData() {
BootCommon::exports = BootCommon::GetMetaData ();
+ // clean option list, otherwise options of different bootloaders
+ // get mixed after bootloader switch
+ BootCommon::global_options = $[];
+ BootCommon::section_options = $[];
// Extract type descriptions from exports
foreach(string key, any value, BootCommon::exports, {
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp Tue May 5 15:25:33 2009
@@ -68,6 +68,10 @@
symbol GOW_Handle (string key, map event) {
y2milestone("Called for key %1 through event %2", key, event);
// FIXME: is that the right way? "path" widget managed right?
+ // bnc #461613 - Unable to boot after making changes to boot loader
+ // bnc #357290 - module rewrites grub generic code when leaving with no changes, which may corrupt grub
+ if (event["EventReason"]:"" == "ValueChanged")
+ BootCommon::location_changed = true;
return generic_Handle (key, event);
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp Tue May 5 15:25:33 2009
@@ -66,9 +66,11 @@
else
{
BootCommon::current_section["name"] = "";
- // BootCommon::current_section["original_name"] = "";
+ BootCommon::current_section["original_name"] = "";
BootCommon::current_section["__auto"] = false;
- BootCommon::current_section["lines_cache_id"] = "";
+ if (haskey(BootCommon::current_section,"lines_cache_id"))
+ BootCommon::current_section = remove(BootCommon::current_section, "lines_cache_id");
+
}
return nil;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp Tue May 5 15:25:33 2009
@@ -81,13 +81,13 @@
),
", "
);
- // Upcase word 'type'
- type = toupper(substring(type,0,1)) + substring(type,1);
return `item (`id (name),
BootCommon::globals["default"]:"" == name ? UI::Glyph (`CheckMark) : "",
name,
- type,
+ (type == "image")
+ ? _("Image")
+ : _("Other"),
summary
);
});
@@ -173,6 +173,11 @@
BootCommon::current_section_index = op == `add ? -1 : index;
BootCommon::current_section_name = name;
y2internal ("Selected section: %1", BootCommon::current_section);
+
+ if (BootCommon::current_section["name"]:"" == BootCommon::globals["default"]:"")
+ BootCommon::default_changed = true;
+ else
+ BootCommon::default_changed = false;
return (symbol)op;
}
else if (op == `delete && confirmSectionDeletePopup (current))
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp Tue May 5 15:25:33 2009
@@ -204,9 +204,15 @@
if ( type == "radio" || type == "check") {
new = `Left(`HBox (
enable_widget,
- `ComboBox (`id (key), def_opt, "",
- maplist(string v, val, ``( `item(`id(v), v) ) )
- )
+ // BNC #395009 Bootloader: Unable to set "Custom boot partition" -
+ // no partitions offered, combobox too small to edit
+ (size (val) > 0 ?
+ `ComboBox (`id (key), def_opt, "",
+ maplist(string v, val, ``( `item(`id(v), v) ) )
+ )
+ :
+ `MinWidth (15, `ComboBox (`id (key), def_opt, "", []))
+ )
));
}
else {
@@ -299,7 +305,14 @@
}
else if (contains(["string", "path", "select", "selectdevice"],
(string)value)) {
- UI::ChangeWidget (`id (key), `Value, data[key]:"");
+
+ // ComboBox doesn't accept `Value, use `Items instead
+ // See bnc #380781
+ if (UI::QueryWidget (`id (key), `WidgetClass) == "YComboBox") {
+ UI::ChangeWidget (`id (key), `Items, [data[key]:""]);
+ } else {
+ UI::ChangeWidget (`id (key), `Value, data[key]:"");
+ }
}
else if (value == "password") {
UI::ChangeWidget (`id (key + "_pw1"), `Value, "**********");
@@ -432,7 +445,15 @@
(string)UI::QueryWidget(`id(base_id), `Value), "*",
_("Select a file name"));
if (file_name != "" && file_name != nil) {
- UI::ChangeWidget(`id(base_id), `Value, file_name);
+
+// ComboBox doesn't accept `Value, use `Items instead
+ // See bnc #380781
+ if (UI::QueryWidget (`id (base_id), `WidgetClass) == "YComboBox") {
+ UI::ChangeWidget(`id(base_id), `Items, [file_name]);
+ } else {
+ UI::ChangeWidget(`id(base_id), `Value, file_name);
+ }
+
reason = "ValueChanged";
id = base_id;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp Tue May 5 15:25:33 2009
@@ -116,6 +116,12 @@
BootCommon::sections[BootCommon::current_section_index]
= BootCommon::current_section;
}
+ // update default name if default section is edited
+ if (BootCommon::default_changed)
+ {
+ BootCommon::globals["default"] = BootCommon::current_section["name"]:"";
+ BootCommon::default_changed = false;
+ }
// write stuff down to perl-bootloader and reimport meta data,
// list of possible values might have changed
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp Tue May 5 15:25:33 2009
@@ -54,6 +54,10 @@
partition. Either select <b>Set active Flag in Partition Table for Boot Partition</b> and <b>Write generic Boot Code to MBR</b>
in <b>Boot Loader Options</b> to update the master boot record if that is needed or configure your other boot manager
to start this section.</p>"),
+ "boot_extended" :
+("<p><b>Boot from Extended Partition</b> should be selected if your root partition is on
+local partition and the /boot partition is missing</p>"),
+
"boot_custom" :
_("<p><b>Custom Boot Partition</b> lets you choose a partition to boot from.</p>"),
"serial" :
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp Tue May 5 15:25:33 2009
@@ -23,6 +23,7 @@
import "Mode";
import "BootCommon";
import "PackageSystem";
+ import "Map";
// --------------------------------------------------------------
@@ -140,28 +141,37 @@
// });
// }
// }
- if (num != 0)
+
+ // (bnc # 337742) - Unable to boot the openSUSE (32 and 64 bits) after installation
+ // if loader_device is disk device activate BootCommon::BootPartitionDevice
+ if (num == 0)
{
- if (num > 4)
- {
- y2milestone ("Bootloader partition type is logical");
- map tm = Storage::GetTargetMap ();
- list<map> partitions = tm[mbr_dev, "partitions"]:[];
- foreach (map p, partitions, ``{
- if (p["type"]:nil == `extended)
- {
- num = p["nr"]:num;
- y2milestone ("Using extended partition %1 instead",
- num);
- }
- });
- }
+ y2milestone ("loader_device is disk device");
+ p_dev = Storage::GetDiskPartition (BootCommon::BootPartitionDevice);
+ num = BootCommon::myToInteger( p_dev["nr"]:nil );
+ }
+
+ if (num > 4)
+ {
+ y2milestone ("Bootloader partition type is logical");
+ map tm = Storage::GetTargetMap ();
+ list<map> partitions = tm[mbr_dev, "partitions"]:[];
+ foreach (map p, partitions, ``{
+ if (p["type"]:nil == `extended)
+ {
+ num = p["nr"]:num;
+ y2milestone ("Using extended partition %1 instead",num);
+ }
+ });
}
+
map ret = $[
"num" : num,
"mbr" : mbr_dev,
"dev" : Storage::GetDeviceName (mbr_dev, num),
];
+
+ y2milestone("Partition for activating: %1", ret);
return ret;
}
@@ -265,6 +275,8 @@
string device_file = mergestring (splitstring (device, "/"), "_");
string device_file_path = "/var/lib/YaST2/backup_boot_sectors/"
+ device_file;
+ string device_file_path_to_logs = "/var/log/YaST2/"
+ + device_file;
SCR::Execute (.target.bash,
"test -d /var/lib/YaST2/backup_boot_sectors || mkdir /var/lib/YaST2/backup_boot_sectors");
if (SCR::Read (.target.size, device_file_path) > 0)
@@ -289,12 +301,24 @@
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, device_file_path));
+ // save MBR to yast2 log directory
+ SCR::Execute (.target.bash, sformat (
+ "/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
+ device, device_file_path_to_logs));
if (device == BootCommon::mbrDisk)
{
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, "/boot/backup_mbr"));
+ // save thinkpad MBR
+ if (BootCommon::ThinkPadMBR(device))
+ {
+ string device_file_path_thinkpad = device_file_path + "thinkpadMBR";
+ y2milestone("Backup thinkpad MBR");
+ SCR::Execute(.target.bash, sformat (
+ "cp %1 %2 2>&1", device_file_path, device_file_path_thinkpad));
+ }
}
}
@@ -459,6 +483,40 @@
}
/**
+ * function check all partitions and it tries to find /boot partition
+ * if it is MD Raid and soft-riad return correct device for analyse MBR
+ * @param list<map> list of partitions
+ * @return string device for analyse MBR
+ */
+define string soft_MDraid_boot_disk(list<map> partitions)
+{
+ string result = "";
+ string boot_device = "";
+ if ((BootCommon::BootPartitionDevice != nil) && (BootCommon::BootPartitionDevice != ""))
+ boot_device = BootCommon::BootPartitionDevice;
+ else
+ boot_device = BootCommon::RootPartitionDevice;
+
+ foreach(map p, partitions, {
+ if (p["device"]:"" == boot_device)
+ {
+ if ((p["type"]:nil == `sw_raid) && (p["fstype"]:"" == "MD Raid"))
+ {
+ string device_1 = p["devices",0]:"";
+ y2debug("device_1: %1", device_1);
+ map dp = Storage::GetDiskPartition (device_1);
+ y2debug("dp: %1", dp);
+ result = dp["disk"]:"";
+ }
+ }
+ });
+ y2milestone("Device for analyse MBR from soft-raid (MD-Raid only): %1", result);
+ return result;
+}
+
+
+
+/**
* grub_ConfigureLocation()
* Where to install the bootloader.
* Returns the type of device where to install: one of `boot `root `mbr `extended `mbr_md
@@ -550,7 +608,10 @@
boolean keep_mbr = BootCommon::KeepMBR (BootCommon::mbrDisk);
// if is primary, store bootloader there
- if (boot_partition_is_on_mbr_disk && ! is_logical)
+ // there was check if boot device is on logical partition
+ // IMO it is good idea check MBR also in this case
+ // see bug #279837 comment #53
+ if (boot_partition_is_on_mbr_disk)
{
selected_location = `boot;
BootCommon::globals["activate"] = "true";
@@ -562,6 +623,13 @@
// - 0 for a "Generic MBR" (DOS MBR)
// - 1 for a GRUB or lilo "stage 1"
// - 0 for an unknown MBR
+
+ // check if there is raid and if it soft-raid select correct device for analyse MBR
+ // bnc #398356
+ if (size (underlying_boot_partition_devices) > 1)
+ boot_partition_disk = soft_MDraid_boot_disk(partitions_on_boot_partition_disk);
+ if (boot_partition_disk == "")
+ boot_partition_disk = dp["disk"]:"";
map out = (map)SCR::Execute (.target.bash_output, sformat (
"/usr/lib/YaST2/bin/examine_mbr.pl %1", boot_partition_disk));
y2milestone ("MBR examining script returned %1", out);
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp?rev=57070&r1=57069&r2=57070&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp Tue May 5 15:25:33 2009
@@ -32,6 +32,10 @@
import "Storage";
import "String";
import "Pkg";
+import "Popup";
+import "Package";
+
+import "Linuxrc";
// General bootloader settings
@@ -51,6 +55,14 @@
*/
global map exports = $[];
+
+/**
+ * boolean value indicate if "/" is on logical
+ * and primary /boot doesn't exist
+ */
+
+global boolean boot_device_on_logical = false;
+
/**
* map of global options and values
*/
@@ -62,11 +74,33 @@
global list