Author: juhliarik
Date: Wed Jul 22 13:39:44 2009
New Revision: 58126
URL: http://svn.opensuse.org/viewcvs/yast?rev=58126&view=rev
Log:
added several fixes
Added:
trunk/bootloader/src/clients/bootloader_preupdate.ycp
trunk/bootloader/src/clients/inst_lilo_convert.ycp
Modified:
trunk/bootloader/VERSION
trunk/bootloader/package/yast2-bootloader.changes
trunk/bootloader/src/clients/Makefile.am
trunk/bootloader/src/clients/bootloader_proposal.ycp
trunk/bootloader/src/grub/misc.ycp
trunk/bootloader/src/grub/options.ycp
trunk/bootloader/src/modules/BootGRUB.ycp
trunk/bootloader/src/modules/BootSupportCheck.ycp
trunk/bootloader/src/routines/helps.ycp
trunk/bootloader/yast2-bootloader.spec.in
Modified: trunk/bootloader/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/VERSION?rev=58126&r1=58125&r2=58126&view=diff
==============================================================================
--- trunk/bootloader/VERSION (original)
+++ trunk/bootloader/VERSION Wed Jul 22 13:39:44 2009
@@ -1 +1 @@
-2.18.8
+2.18.9
Modified: trunk/bootloader/package/yast2-bootloader.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootloader.changes?rev=58126&r1=58125&r2=58126&view=diff
==============================================================================
--- trunk/bootloader/package/yast2-bootloader.changes (original)
+++ trunk/bootloader/package/yast2-bootloader.changes Wed Jul 22 13:39:44 2009
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Mon Jul 20 16:51:05 CEST 2009 - juhliarik@suse.cz
+
+- added client bootloader_preupdate it takes care about calling
+ Storage::Update() (bnc#414490)
+- added fix for using iscsi disk (bnc#393928)
+- updated help text (bnc#511007)
+- enabled change bootloader settings via one-click in installation
+ summary (fate#303643)
+- deleted warning message about using ext4
+- updated proposal and using checkboxes Boot from Boot Partition
+ and Boot from Extended Partition
+- 2.18.9
+
+-------------------------------------------------------------------
Mon Jun 8 10:37:27 CEST 2009 - jsrain@suse.cz
- do not add 'ide=nodma' to failsafe kernel parameter (bnc#510784)
Modified: trunk/bootloader/src/clients/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/Makefile.am?rev=58126&r1=58125&r2=58126&view=diff
==============================================================================
--- trunk/bootloader/src/clients/Makefile.am (original)
+++ trunk/bootloader/src/clients/Makefile.am Wed Jul 22 13:39:44 2009
@@ -9,7 +9,8 @@
bootloader_finish.ycp \
print-product.ycp \
inst_bootloader.ycp \
- inst_lilo_convert.ycp
+ inst_lilo_convert.ycp \
+ bootloader_preupdate.ycp
EXTRA_DIST = \
$(client_DATA)
Added: trunk/bootloader/src/clients/bootloader_preupdate.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/bootloader_preupdate.ycp?rev=58126&view=auto
==============================================================================
--- trunk/bootloader/src/clients/bootloader_preupdate.ycp (added)
+++ trunk/bootloader/src/clients/bootloader_preupdate.ycp Wed Jul 22 13:39:44 2009
@@ -0,0 +1,132 @@
+/**
+ * File:
+ * bootloader/routines/bootloader_preupdate.ycp
+ *
+ * Module:
+ * Bootloader installation and configuration
+ *
+ * Summary:
+ * Client for handling pre-update bootloader configuration
+ *
+ * Authors:
+ * Jozef Uhliarik
+ *
+ *
+ */
+
+{
+
+textdomain "bootloader";
+
+
+import "BootCommon";
+import "BootStorage";
+import "Installation";
+import "GetInstArgs";
+import "Mode";
+import "Arch";
+import "BootGRUB";
+import "Storage";
+
+y2milestone ("starting bootloader_preupdate");
+
+boolean preUpdateDeviceMap()
+{
+ boolean ret = false;
+ string device_map = (string) WFM::Read(.local.string, Installation::destdir +"/boot/grub/device.map");
+ if (device_map == nil)
+ {
+ y2error("Reading device map failed.");
+ return false;
+ }
+ y2milestone("Device map: %1", device_map);
+
+ BootCommon::InitializeLibrary(true, "grub");
+ BootCommon::setLoaderType("grub");
+ map new_files = $[];
+ new_files["/boot/grub/device.map"] = device_map;
+ ret = BootCommon::SetFilesContents (new_files);
+ if (!ret)
+ {
+ y2error("SetFilesContents failed.");
+ return false;
+ }
+ BootStorage::device_mapping = BootCommon::GetDeviceMap ();
+
+ if ((BootStorage::device_mapping == nil) || (size(BootStorage::device_mapping) == 0))
+ {
+ y2error("Parsing device map failed or it is empty.");
+ return false;
+ }
+ BootCommon::UpdateDeviceMap();
+
+ ret = BootCommon::SetDeviceMap(BootStorage::device_mapping);
+ if (!ret)
+ {
+ y2error("Set device map failed.");
+ return false;
+ }
+
+ new_files = BootCommon::GetFilesContents();
+ y2milestone("new content file: %1", new_files);
+
+ string content_dev_map = new_files["/boot/grub/device.map"]:nil;
+
+ if ((content_dev_map != nil ) && (content_dev_map != ""))
+ {
+ y2milestone("writing device map: %1", content_dev_map);
+ WFM::Write(.local.string, Installation::destdir +"/boot/grub/device.map",
+ content_dev_map);
+ }
+
+ return ret;
+}
+
+
+if ( GetInstArgs::going_back()) // going backwards?
+{
+ return `auto; // don't execute this once more
+}
+
+if (Mode::update() && (Arch::x86_64() || Arch::i386()))
+{
+
+ // save some sysconfig variables
+ // register new agent pointing into the mounted filesystem
+ path sys_agent = .target.sysconfig.bootloader;
+
+ string target_sysconfig_path = Installation::destdir + "/etc/sysconfig/bootloader";
+ SCR::RegisterAgent (.target.sysconfig.bootloader, `ag_ini(`SysConfigFile(target_sysconfig_path)));
+
+ string bl = (string) SCR::Read(add(sys_agent,.LOADER_TYPE));
+
+ any ret = nil;
+ if (bl == "grub") {
+
+ y2milestone("updating device map...");
+ if (preUpdateDeviceMap())
+ {
+ y2milestone("Update device map is done successful");
+ BootGRUB::update_device_map_done = true;
+ } else {
+ y2error("Update device map failed");
+ BootGRUB::update_device_map_done = false;
+ }
+
+ y2milestone("Calling storage update");
+ Storage::Update (Installation::installedVersion, Installation::updateVersion);
+ }
+
+ if (ret == `back)
+ return `back;
+
+ if (ret == `next)
+ return `next;
+
+}
+
+y2milestone ("finish bootloader_preupdate");
+
+return `auto;
+
+}
Modified: trunk/bootloader/src/clients/bootloader_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/bootloader_proposal.ycp?rev=58126&r1=58125&r2=58126&view=diff
==============================================================================
--- trunk/bootloader/src/clients/bootloader_proposal.ycp (original)
+++ trunk/bootloader/src/clients/bootloader_proposal.ycp Wed Jul 22 13:39:44 2009
@@ -93,6 +93,12 @@
BootGRUB::merge_level = `none;
+
+ ret["links"] = [
+ "enable_boot_mbr", "disable_boot_mbr",
+ "enable_boot_root", "disable_boot_root",
+ "enable_boot_boot", "disable_boot_boot",
+ ];
}
else
{
@@ -101,7 +107,7 @@
// to make sure packages will get installed
BootCommon::setLoaderType (BootCommon::getLoaderType (false));
- ret = $[ "raw_proposal" : Bootloader::Summary ()];
+ ret["raw_proposal"] = Bootloader::Summary ();
if (Bootloader::getLoaderType () == "grub")
@@ -238,21 +244,74 @@
// up the Bootloader.
else if ( func == "AskUser" )
{
- boolean has_next = param["has_next"]:false;
- map settings = Bootloader::Export ();
- // don't ask for abort confirm if nothing was changed (#29496)
- BootCommon::changed = false;
- symbol result = BootloaderAutoSequence ();
- // set to true, simply because must be saved during installation
- BootCommon::changed = true;
- if (result != `next)
- Bootloader::Import ((map)settings);
- else
+ any chosen_id = param["chosen_id"]:nil;
+ symbol result = `next;
+ y2milestone("Bootloader wanted to change with id %1", chosen_id);
+
+ // enable boot from MBR
+ if (chosen_id == "enable_boot_mbr")
+ {
+ y2milestone("Boot from MBR enabled by a single-click");
+ BootCommon::globals["boot_mbr"] = "true";
+ Bootloader::proposed_cfg_changed = true;
+ }
+
+ // disable boot from MBR
+ else if (chosen_id == "disable_boot_mbr")
+ {
+ y2milestone("Boot from MBR disabled by a single-click");
+ BootCommon::globals["boot_mbr"] = "false";
Bootloader::proposed_cfg_changed = true;
+ }
+ // enable boot from /boot
+ else if (chosen_id == "enable_boot_boot")
+ {
+ y2milestone("Boot from /boot enabled by a single-click");
+ BootCommon::globals["boot_boot"] = "true";
+ Bootloader::proposed_cfg_changed = true;
+ }
+ // disable boot from /boot
+ else if (chosen_id == "disable_boot_boot")
+ {
+ y2milestone("Boot from /boot disabled by a single-click");
+ BootCommon::globals["boot_boot"] = "false";
+ Bootloader::proposed_cfg_changed = true;
+ }
+
+ // enable boot from /
+ else if (chosen_id == "enable_boot_root")
+ {
+ y2milestone("Boot from / enabled by a single-click");
+ BootCommon::globals["boot_root"] = "true";
+ Bootloader::proposed_cfg_changed = true;
+ }
+
+ // disable boot from /
+ else if (chosen_id == "disable_boot_root")
+ {
+ y2milestone("Boot from / disabled by a single-click");
+ BootCommon::globals["boot_root"] = "false";
+ Bootloader::proposed_cfg_changed = true;
+ }
+ else
+ {
+ boolean has_next = param["has_next"]:false;
+
+ map settings = Bootloader::Export ();
+ // don't ask for abort confirm if nothing was changed (#29496)
+ BootCommon::changed = false;
+ result = BootloaderAutoSequence ();
+ // set to true, simply because must be saved during installation
+ BootCommon::changed = true;
+ if (result != `next)
+ Bootloader::Import ((map)settings);
+ else
+ Bootloader::proposed_cfg_changed = true;
+ }
// Fill return map
- ret = $[ "workflow_sequence" : result ];
+ ret["workflow_sequence"] = result;
}
// This describes the "active" parts of the Bootloader proposal section.
else if ( func == "Description" )
Added: trunk/bootloader/src/clients/inst_lilo_convert.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/inst_lilo_convert.ycp?rev=58126&view=auto
==============================================================================
--- trunk/bootloader/src/clients/inst_lilo_convert.ycp (added)
+++ trunk/bootloader/src/clients/inst_lilo_convert.ycp Wed Jul 22 13:39:44 2009
@@ -0,0 +1,179 @@
+/**
+ * File:
+ * bootloader/routines/inst_bootloader.ycp
+ *
+ * Module:
+ * Bootloader installation and configuration
+ *
+ * Summary:
+ * Functions to write "dummy" config files for kernel
+ *
+ * Authors:
+ * Jozef Uhliarik
+ *
+ *
+ */
+
+{
+
+textdomain "bootloader";
+
+
+import "BootCommon";
+import "BootStorage";
+import "Installation";
+import "GetInstArgs";
+import "Mode";
+import "Label";
+import "Wizard";
+import "Popup";
+import "Pkg";
+import "Arch";
+import "BootGRUB";
+import "PackagesProposal";
+
+y2milestone ("starting inst_lilo_convert");
+
+
+
+
+
+void selectPackage()
+{
+ PackagesProposal::AddResolvables ("yast2-bootloader", `package, ["grub"]);
+}
+
+void convertSettings()
+{
+
+ string lilo_conf = (string) WFM::Read(.local.string, Installation::destdir + "/etc/lilo.conf");
+ BootCommon::InitializeLibrary(true, "lilo");
+ BootCommon::setLoaderType("lilo");
+ map new_files = $[];
+ new_files["/etc/lilo.conf"] = lilo_conf;
+ y2milestone("/etc/lilo.conf : %1", new_files);
+ BootCommon::SetFilesContents (new_files);
+
+ list