Hello community,
here is the log from the commit of package yast2-bootloader for openSUSE:Factory
checked in at Thu Jan 29 01:32:22 CET 2009.
--------
--- yast2-bootloader/yast2-bootloader.changes 2009-01-26 16:57:13.000000000 +0100
+++ yast2-bootloader/yast2-bootloader.changes 2009-01-27 17:18:58.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Jan 27 17:14:25 CET 2009 - juhliarik@suse.cz
+
+- added fix for problem with adding boot entry to EFI if
+ installation run on different disk but with same boot partition
+ (bnc #450682)
+- 2.17.52
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-bootloader-2.17.51.tar.bz2
New:
----
yast2-bootloader-2.17.52.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.B15612/_old 2009-01-29 01:31:46.000000000 +0100
+++ /var/tmp/diff_new_pack.B15612/_new 2009-01-29 01:31:46.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-bootloader (Version 2.17.51)
+# spec file for package yast2-bootloader (Version 2.17.52)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-bootloader
-Version: 2.17.51
+Version: 2.17.52
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-bootloader-2.17.51.tar.bz2
+Source0: yast2-bootloader-2.17.52.tar.bz2
Prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen gcc-c++ libxslt limal-perl perl-Bootloader perl-XML-Writer perl-gettext sgml-skel swig update-alternatives update-desktop-files yast2-devtools yast2-installation yast2-perl-bindings yast2-storage yast2-testsuite
# to eliminate a cyclic dependency in autobuild:
@@ -68,7 +68,7 @@
Daniel Fiser
%prep
-%setup -n yast2-bootloader-2.17.51
+%setup -n yast2-bootloader-2.17.52
%build
%{prefix}/bin/y2tool y2autoconf
@@ -114,6 +114,11 @@
/var/adm/fillup-templates/*
/usr/share/YaST2/schema/autoyast/rnc/bootloader.rnc
%changelog
+* Tue Jan 27 2009 juhliarik@suse.cz
+- added fix for problem with adding boot entry to EFI if
+ installation run on different disk but with same boot partition
+ (bnc #450682)
+- 2.17.52
* Mon Jan 26 2009 juhliarik@suse.cz
- updated function Dev2MountByDev() which can run long time if
machine included huge number of disks (bnc #468922)
++++++ yast2-bootloader-2.17.51.tar.bz2 -> yast2-bootloader-2.17.52.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.17.51/src/modules/BootELILO.ycp new/yast2-bootloader-2.17.52/src/modules/BootELILO.ycp
--- old/yast2-bootloader-2.17.51/src/modules/BootELILO.ycp 2009-01-26 14:53:33.000000000 +0100
+++ new/yast2-bootloader-2.17.52/src/modules/BootELILO.ycp 2009-01-27 17:17:56.000000000 +0100
@@ -17,7 +17,7 @@
* Olaf Dabrunz
* Philipp Thomas
*
- * $Id: BootELILO.ycp 54283 2008-12-19 09:59:22Z juhliarik $
+ * $Id: BootELILO.ycp 55089 2009-01-27 16:17:56Z juhliarik $
*
*/
@@ -65,6 +65,13 @@
string efi_vendor = "SuSE";
/**
+ * bnc #450682 - adding boot entry to EFI
+ * true is label was added
+ */
+
+global boolean added_label_to_efi = false;
+
+/**
* Is the /sys/firmware/efi directory available?
*/
boolean efi_available = true;
@@ -450,6 +457,9 @@
// error popup - label, %1 is bootloader name
_("Error Occurred while Installing %1"),
BootCommon::getLoaderName (BootCommon::getLoaderType (false), `summary)), log);
+ } else {
+ added_label_to_efi = true;
+ y2milestone("Adding label to EFI finish successful");
}
return ret;
}
@@ -566,13 +576,51 @@
return ret;
}
+/** FIXME: efibootmgr doesn't provide info about disk!
+ * bnc #450682 - adding boot entry to EFI
+ * function delete all existing boot entry with same name and partition number
+ * @param string name of label
+ * @param string number of partition
+ */
+
+void deleteSameEFIBootEntry(string name, any part_no)
+{
+ boolean still_exist = true;
+
+ string cmd = sformat("efibootmgr -v |grep \"%1.*HD(%2.*File(.\\efi.\\SuSE.\\elilo.efi)\" | cut -d \" \" -f 1",
+ name, tomyhexa(part_no));
+ y2milestone("run command %1", cmd);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+
+ string boot_entries = out["stdout"]:"";
+ y2milestone("EFI boot entries with \"same\" boot partition %1",boot_entries);
+
+ list<string> list_boot_entries = splitstring(boot_entries, "\n");
+
+ y2milestone("list_boot_entries=%1",list_boot_entries);
+
+ foreach(string entry, list_boot_entries,
+ {
+ if ((deletechars(entry, "\n*") != "") && (deletechars(entry, "\n*") != nil))
+ {
+ cmd = sformat("/usr/sbin/efibootmgr --delete-bootnum --bootnum %1 -q;",
+ substring (deletechars(entry, "\n*"),4, 4));
+ y2milestone("run command %1", cmd);
+ out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+ }
+ });
+}
/**
* Write bootloader settings to disk
* @return boolean true on success
*/
global define boolean Write () {
+
+ y2milestone("run Write function from BootELILO");
// SCR::Execute (.target.bash, "/sbin/elilo");
boolean ret = BootCommon::UpdateBootloader ();
if (ret == nil)
@@ -621,10 +669,23 @@
// check number of same boot entries in efi
// if boot entry is added -> don't add it again
if (deletechars(out["stdout"]:"","\n") == "0")
+ {
ret = ret && installBootLoader (bl_command, bl_logfile);
- else
- y2milestone("Skip adding boot entry: %1 to EFI. There already exist: %2 with same label and partition.",
- BootCommon::globals["boot_efilabel"]:"", deletechars(out["stdout"]:"","\n"));
+ } else {
+
+ if (added_label_to_efi)
+ {
+ y2milestone("Skip adding boot entry: %1 to EFI. There already exist and was added: %2 with
+ same label and partition.", BootCommon::globals["boot_efilabel"]:"",
+ deletechars(out["stdout"]:"","\n"));
+ } else {
+ // delete efi entry with same label name and partition
+ deleteSameEFIBootEntry(BootCommon::globals["boot_efilabel"]:"", boot_part);
+ // add new efi boot entry
+ ret = ret && installBootLoader (bl_command, bl_logfile);
+ }
+
+ }
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.17.51/VERSION new/yast2-bootloader-2.17.52/VERSION
--- old/yast2-bootloader-2.17.51/VERSION 2009-01-26 16:06:05.000000000 +0100
+++ new/yast2-bootloader-2.17.52/VERSION 2009-01-27 17:16:29.000000000 +0100
@@ -1 +1 @@
-2.17.51
+2.17.52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org