Mailinglist Archive: yast-commit (503 mails)
| < Previous | Next > |
[yast-commit] r41125 - in /branches/SuSE-Linux-10_3-Branch/bootloader/src: modules/ routines/
- From: odabrunz@xxxxxxxxxxxxxxxx
- Date: Wed, 26 Sep 2007 20:48:27 -0000
- Message-id: <20070926204827.E088924FE9@xxxxxxxxxxxxxxxx>
Author: odabrunz
Date: Wed Sep 26 22:48:27 2007
New Revision: 41125
URL: http://svn.opensuse.org/viewcvs/yast?rev=41125&view=rev
Log:
- added flag avoid_reading_device_map to blRead(), all internal
Read()s and ReadSettings() interface to perl-Bootloader: used by
BootLILO and BootGRUB during update to migrate device names in
the device_map and then re-read the config files with correct
device name translation (#328448)
- do not install bootloader in XEN paravirtualized DomU (#308451)
Modified:
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm
branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp Wed Sep 26 22:48:27 2007
@@ -611,16 +611,18 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
string bl = getLoaderType (false);
if (bl == "none")
return true;
InitializeLibrary (reread, bl);
if (reread)
{
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
sections = GetSections ();
globals = GetGlobal ();
@@ -925,9 +927,10 @@
if (loader_type == "s390")
loader_type = "zipl";
y2milestone ("Bootloader detection returned %1", loader_type);
- if (Arch::is_uml ())
+ // lslezak@: Arch::is_xenU() returns true only in PV guest
+ if (Arch::is_uml () || Arch::is_xenU())
{
- y2milestone ("Not installing any bootloader for UML");
+ y2milestone ("Not installing any bootloader for UML/Xen PV");
loader_type = "none";
}
if (loader_type == "grub" && Storage::UseLilo())
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp Wed Sep 26 22:48:27 2007
@@ -202,9 +202,12 @@
/**
* Read settings from disk
+ * @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global define boolean Read (boolean reread) {
+global define boolean Read (boolean reread, boolean avoid_reading_device_map) {
import "Product";
boolean efi_entry_found = false;
elilo_conf_filename = getEliloConfFilename ();
@@ -218,7 +221,7 @@
}
SCR::Execute (.target.bash, "/bin/touch /etc/elilo.conf");
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (reread);
+ boolean ret = BootCommon::Read (reread, avoid_reading_device_map);
// check for meaningless EFI entry name in sysconfig
if ( !haskey(BootCommon::globals,"boot_efilabel")
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp Wed Sep 26 22:48:27 2007
@@ -617,15 +617,17 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "grub");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
grub_DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
// refresh device map if not read
if (BootCommon::device_mapping == nil
|| size (BootCommon::device_mapping) == 0)
@@ -957,6 +959,18 @@
*/
global define void Update () {
BootCommon::UpdateDeviceMap ();
+
+ // During update, for libata device name migration ("/dev/hda1" ->
+ // "/dev/sda1") and somesuch, we need to re-read and parse the rest of the
+ // configuration file contents after internally updating the device map in
+ // perl-Bootloader. This way, the device names are consistent with the
+ // partitioning information we have set up in perl-Bootloader with
+ // SetDiskInfo(), and device names in other config files can be translated
+ // to Unix device names (#328448, this hits sections that are not
+ // (re-)created by yast-Bootloader or later by perl-Bootloader anyway).
+ BootCommon::SetDeviceMap (BootCommon::device_mapping);
+ Read (true, true);
+
BootCommon::UpdateSections (true, CreateLinuxSection);
BootCommon::UpdateGlobals ();
}
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp Wed Sep 26 22:48:27 2007
@@ -163,16 +163,18 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "lilo");
if (reread)
{
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
BootCommon::loader_device = BootCommon::globals["stage1_dev"]:"";
return ret;
}
@@ -198,6 +200,18 @@
*/
global void Update () {
BootCommon::UpdateDeviceMap ();
+
+ // During update, for libata device name migration ("/dev/hda1" ->
+ // "/dev/sda1") and somesuch, we need to re-read and parse the rest of the
+ // configuration file contents after internally updating the device map in
+ // perl-Bootloader. This way, the device names are consistent with the
+ // partitioning information we have set up in perl-Bootloader with
+ // SetDiskInfo(), and device names in other config files can be translated
+ // to Unix device names (#328448, this hits sections that are not
+ // (re-)created by yast-Bootloader or later by perl-Bootloader anyway).
+ BootCommon::SetDeviceMap (BootCommon::device_mapping);
+ Read (true, true);
+
BootCommon::UpdateSections (true, BootCommon::CreateLinuxSection);
BootCommon::UpdateGlobals ();
BootCommon::loader_device
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp Wed Sep 26 22:48:27 2007
@@ -821,15 +821,18 @@
/**
* Read settings from disk
+ * @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "ppc");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
y2milestone (":: Read globals: %1", BootCommon::globals);
importMetaData();
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp Wed Sep 26 22:48:27 2007
@@ -163,15 +163,17 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "zipl");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
return ret;
}
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp Wed Sep 26 22:48:27 2007
@@ -223,7 +223,7 @@
if (testAbort ())
return false;
- boolean ret = blRead (true);
+ boolean ret = blRead (true, false);
BootCommon::was_read = true;
old_vga = getKernelParam (getDefaultSection (), "vga");
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm Wed Sep 26 22:48:27 2007
@@ -80,10 +80,11 @@
return $ret;
}
-BEGIN { $TYPEINFO{readSettings} = ["function", "boolean"]; }
+BEGIN { $TYPEINFO{readSettings} = ["function", "boolean", "boolean"]; }
# read configuration
sub readSettings() {
- my $ret = $lib_ref->ReadSettings();
+ my ($avoid_reading_device_map) = @_;
+ my $ret = $lib_ref->ReadSettings($avoid_reading_device_map);
DumpLog();
return $ret ? "true" : "false";
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp Wed Sep 26 22:48:27 2007
@@ -367,7 +367,7 @@
{
files[filename] = (string)UI::QueryWidget (`id (`file), `Value);
BootCommon::SetFilesContents (files);
- Bootloader::blRead (false);
+ Bootloader::blRead (false, false);
BootCommon::changed = true;
BootCommon::location_changed = true;
}
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp Wed Sep 26 22:48:27 2007
@@ -284,11 +284,13 @@
/**
* Read the files from the system to internal cache of the library
+ * @param avoid_reading_device_map do not read the device map, but use internal
+ * data
* @return boolean true on success
*/
-global boolean ReadFiles () {
+global boolean ReadFiles (boolean avoid_reading_device_map) {
y2milestone ("Reading Files");
- boolean ret = System::Bootloader_API::readSettings ();
+ boolean ret = System::Bootloader_API::readSettings (avoid_reading_device_map);
if (! ret)
y2error ("Reading files failed");
return ret;
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp Wed Sep 26 22:48:27 2007
@@ -79,10 +79,10 @@
* @param reread boolean true to force rereading the settings from the disk
* @return boolean true on success
*/
-global define boolean blRead (boolean reread) ``{
+global define boolean blRead (boolean reread, boolean avoid_reading_device_map) ``{
map functions = getFunctions (BootCommon::getLoaderType (false));
- boolean(boolean) toEval = functions["read"]:BootCommon::Read;
- return toEval (reread);
+ boolean(boolean, boolean) toEval = functions["read"]:BootCommon::Read;
+ return toEval (reread, avoid_reading_device_map);
}
/**
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Wed Sep 26 22:48:27 2007
New Revision: 41125
URL: http://svn.opensuse.org/viewcvs/yast?rev=41125&view=rev
Log:
- added flag avoid_reading_device_map to blRead(), all internal
Read()s and ReadSettings() interface to perl-Bootloader: used by
BootLILO and BootGRUB during update to migrate device names in
the device_map and then re-read the config files with correct
device name translation (#328448)
- do not install bootloader in XEN paravirtualized DomU (#308451)
Modified:
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm
branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp
branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootCommon.ycp Wed Sep 26 22:48:27 2007
@@ -611,16 +611,18 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
string bl = getLoaderType (false);
if (bl == "none")
return true;
InitializeLibrary (reread, bl);
if (reread)
{
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
sections = GetSections ();
globals = GetGlobal ();
@@ -925,9 +927,10 @@
if (loader_type == "s390")
loader_type = "zipl";
y2milestone ("Bootloader detection returned %1", loader_type);
- if (Arch::is_uml ())
+ // lslezak@: Arch::is_xenU() returns true only in PV guest
+ if (Arch::is_uml () || Arch::is_xenU())
{
- y2milestone ("Not installing any bootloader for UML");
+ y2milestone ("Not installing any bootloader for UML/Xen PV");
loader_type = "none";
}
if (loader_type == "grub" && Storage::UseLilo())
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootELILO.ycp Wed Sep 26 22:48:27 2007
@@ -202,9 +202,12 @@
/**
* Read settings from disk
+ * @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global define boolean Read (boolean reread) {
+global define boolean Read (boolean reread, boolean avoid_reading_device_map) {
import "Product";
boolean efi_entry_found = false;
elilo_conf_filename = getEliloConfFilename ();
@@ -218,7 +221,7 @@
}
SCR::Execute (.target.bash, "/bin/touch /etc/elilo.conf");
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (reread);
+ boolean ret = BootCommon::Read (reread, avoid_reading_device_map);
// check for meaningless EFI entry name in sysconfig
if ( !haskey(BootCommon::globals,"boot_efilabel")
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootGRUB.ycp Wed Sep 26 22:48:27 2007
@@ -617,15 +617,17 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "grub");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
grub_DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
// refresh device map if not read
if (BootCommon::device_mapping == nil
|| size (BootCommon::device_mapping) == 0)
@@ -957,6 +959,18 @@
*/
global define void Update () {
BootCommon::UpdateDeviceMap ();
+
+ // During update, for libata device name migration ("/dev/hda1" ->
+ // "/dev/sda1") and somesuch, we need to re-read and parse the rest of the
+ // configuration file contents after internally updating the device map in
+ // perl-Bootloader. This way, the device names are consistent with the
+ // partitioning information we have set up in perl-Bootloader with
+ // SetDiskInfo(), and device names in other config files can be translated
+ // to Unix device names (#328448, this hits sections that are not
+ // (re-)created by yast-Bootloader or later by perl-Bootloader anyway).
+ BootCommon::SetDeviceMap (BootCommon::device_mapping);
+ Read (true, true);
+
BootCommon::UpdateSections (true, CreateLinuxSection);
BootCommon::UpdateGlobals ();
}
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootLILO.ycp Wed Sep 26 22:48:27 2007
@@ -163,16 +163,18 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "lilo");
if (reread)
{
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
BootCommon::loader_device = BootCommon::globals["stage1_dev"]:"";
return ret;
}
@@ -198,6 +200,18 @@
*/
global void Update () {
BootCommon::UpdateDeviceMap ();
+
+ // During update, for libata device name migration ("/dev/hda1" ->
+ // "/dev/sda1") and somesuch, we need to re-read and parse the rest of the
+ // configuration file contents after internally updating the device map in
+ // perl-Bootloader. This way, the device names are consistent with the
+ // partitioning information we have set up in perl-Bootloader with
+ // SetDiskInfo(), and device names in other config files can be translated
+ // to Unix device names (#328448, this hits sections that are not
+ // (re-)created by yast-Bootloader or later by perl-Bootloader anyway).
+ BootCommon::SetDeviceMap (BootCommon::device_mapping);
+ Read (true, true);
+
BootCommon::UpdateSections (true, BootCommon::CreateLinuxSection);
BootCommon::UpdateGlobals ();
BootCommon::loader_device
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootPOWERLILO.ycp Wed Sep 26 22:48:27 2007
@@ -821,15 +821,18 @@
/**
* Read settings from disk
+ * @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "ppc");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
y2milestone (":: Read globals: %1", BootCommon::globals);
importMetaData();
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/BootZIPL.ycp Wed Sep 26 22:48:27 2007
@@ -163,15 +163,17 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "zipl");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
return ret;
}
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader.ycp Wed Sep 26 22:48:27 2007
@@ -223,7 +223,7 @@
if (testAbort ())
return false;
- boolean ret = blRead (true);
+ boolean ret = blRead (true, false);
BootCommon::was_read = true;
old_vga = getKernelParam (getDefaultSection (), "vga");
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/modules/Bootloader_API.pm Wed Sep 26 22:48:27 2007
@@ -80,10 +80,11 @@
return $ret;
}
-BEGIN { $TYPEINFO{readSettings} = ["function", "boolean"]; }
+BEGIN { $TYPEINFO{readSettings} = ["function", "boolean", "boolean"]; }
# read configuration
sub readSettings() {
- my $ret = $lib_ref->ReadSettings();
+ my ($avoid_reading_device_map) = @_;
+ my $ret = $lib_ref->ReadSettings($avoid_reading_device_map);
DumpLog();
return $ret ? "true" : "false";
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/dialogs.ycp Wed Sep 26 22:48:27 2007
@@ -367,7 +367,7 @@
{
files[filename] = (string)UI::QueryWidget (`id (`file), `Value);
BootCommon::SetFilesContents (files);
- Bootloader::blRead (false);
+ Bootloader::blRead (false, false);
BootCommon::changed = true;
BootCommon::location_changed = true;
}
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/lib_iface.ycp Wed Sep 26 22:48:27 2007
@@ -284,11 +284,13 @@
/**
* Read the files from the system to internal cache of the library
+ * @param avoid_reading_device_map do not read the device map, but use internal
+ * data
* @return boolean true on success
*/
-global boolean ReadFiles () {
+global boolean ReadFiles (boolean avoid_reading_device_map) {
y2milestone ("Reading Files");
- boolean ret = System::Bootloader_API::readSettings ();
+ boolean ret = System::Bootloader_API::readSettings (avoid_reading_device_map);
if (! ret)
y2error ("Reading files failed");
return ret;
Modified: branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp?rev=41125&r1=41124&r2=41125&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp (original)
+++ branches/SuSE-Linux-10_3-Branch/bootloader/src/routines/switcher.ycp Wed Sep 26 22:48:27 2007
@@ -79,10 +79,10 @@
* @param reread boolean true to force rereading the settings from the disk
* @return boolean true on success
*/
-global define boolean blRead (boolean reread) ``{
+global define boolean blRead (boolean reread, boolean avoid_reading_device_map) ``{
map functions = getFunctions (BootCommon::getLoaderType (false));
- boolean(boolean) toEval = functions["read"]:BootCommon::Read;
- return toEval (reread);
+ boolean(boolean, boolean) toEval = functions["read"]:BootCommon::Read;
+ return toEval (reread, avoid_reading_device_map);
}
/**
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |