Hello community,
here is the log from the commit of package yast2-bootloader
checked in at Thu Aug 30 23:45:04 CEST 2007.
--------
--- yast2-bootloader/yast2-bootloader.changes 2007-08-20 19:44:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-bootloader/yast2-bootloader.changes 2007-08-30 17:40:06.483995000 +0200
@@ -2 +2 @@
-Mon Aug 20 19:39:12 CEST 2007 - pth@suse.de
+Tue Aug 28 18:35:52 CEST 2007 - pth@suse.de
@@ -4 +4,8 @@
-- Implement one-time boot (Fate 301313)
+- Fix the code in bootloader_finish so that the one-time-boot code
+ is actually called.
+- Redo the logic and structure of the one-time booting code.
+ * Global Write uses Bootloader::getDefaultSection() to determine the
+ section name.
+ * New function BootCommon::Section2Index that determines the
+ index # for a given section, currently only used by
+ BootGRUB::FlagOnetimeBoot.
Old:
----
yast2-bootloader-2.15.18.tar.bz2
New:
----
yast2-bootloader-2.15.19.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.J18887/_old 2007-08-30 23:44:21.000000000 +0200
+++ /var/tmp/diff_new_pack.J18887/_new 2007-08-30 23:44:21.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-bootloader (Version 2.15.18)
+# spec file for package yast2-bootloader (Version 2.15.19)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-bootloader
-Version: 2.15.18
+Version: 2.15.19
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-bootloader-2.15.18.tar.bz2
+Source0: yast2-bootloader-2.15.19.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:
@@ -50,7 +50,7 @@
Olaf Dabrunz
%prep
-%setup -n yast2-bootloader-2.15.18
+%setup -n yast2-bootloader-2.15.19
%build
%{prefix}/bin/y2tool y2autoconf
@@ -95,8 +95,15 @@
/usr/share/YaST2/schema/autoyast/rnc/bootloader.rnc
%changelog
-* Mon Aug 20 2007 - pth@suse.de
-- Implement one-time boot (Fate 301313)
+* Tue Aug 28 2007 - pth@suse.de
+- Fix the code in bootloader_finish so that the one-time-boot code
+ is actually called.
+- Redo the logic and structure of the one-time booting code.
+ * Global Write uses Bootloader::getDefaultSection() to determine the
+ section name.
+ * New function BootCommon::Section2Index that determines the
+ index # for a given section, currently only used by
+ BootGRUB::FlagOnetimeBoot.
* Wed Aug 15 2007 - od@suse.de
- forgot to use changed sections (feature #302302)
- added logging with y2milestone()s for last change
++++++ yast2-bootloader-2.15.18.tar.bz2 -> yast2-bootloader-2.15.19.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/clients/bootloader_finish.ycp new/yast2-bootloader-2.15.19/src/clients/bootloader_finish.ycp
--- old/yast2-bootloader-2.15.18/src/clients/bootloader_finish.ycp 2007-08-20 19:10:08.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/clients/bootloader_finish.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Jiri Srain
*
- * $Id: bootloader_finish.ycp 40371 2007-08-20 17:10:08Z pth $
+ * $Id: bootloader_finish.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -150,23 +150,27 @@
// Bootloader::ReadOrProposeIfNeeded() (which is called the first time
// Write() is reached from the call-chain that starts below:
// Bootloader::Update() -> Write()).
+
if (!Mode::update ())
Bootloader::ResolveSymlinksInSections();
+ boolean retcode = false;
+
if (!Mode::update ())
{
- return Bootloader::Write ();
+ retcode = Bootloader::Write ();
}
else
{
- return Bootloader::Update (
+ retcode = Bootloader::Update (
Update::installedVersion,
Update::updateVersion);
}
- string default_name = BootCommon::globals["default"]:"";
-
- return Bootloader::FlagOnetimeBoot (default_name);
+ if (retcode)
+ return Bootloader::FlagOnetimeBoot(Bootloader::getDefaultSection ());
+ else
+ return retcode;
}
else
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/BootCommon.ycp new/yast2-bootloader-2.15.19/src/modules/BootCommon.ycp
--- old/yast2-bootloader-2.15.18/src/modules/BootCommon.ycp 2007-08-20 16:37:37.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/BootCommon.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -15,7 +15,7 @@
* Joachim Plack
* Olaf Dabrunz
*
- * $Id: BootCommon.ycp 40212 2007-08-10 18:08:36Z odabrunz $
+ * $Id: BootCommon.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -1013,6 +1013,25 @@
return ret;
}
+/**
+ * Search for section passed
+ * @return integer index number
+ */
+
+global define integer Section2Index (string section_name)
+{
+ integer index = -1;
+ integer sectnum = -1;
+
+ foreach (map s, BootCommon::sections, {
+ index = index + 1;
+ if (s["name"]:"" == section_name)
+ sectnum = index;
+ });
+
+ return sectnum;
+}
+
}
/*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/BootELILO.ycp new/yast2-bootloader-2.15.19/src/modules/BootELILO.ycp
--- old/yast2-bootloader-2.15.18/src/modules/BootELILO.ycp 2007-08-20 19:10:08.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/BootELILO.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -14,8 +14,9 @@
* Joachim Plack
* Jiri Srain
* Andreas Schwab
+ * Philipp Thomas
*
- * $Id: BootELILO.ycp 40371 2007-08-20 17:10:08Z pth $
+ * $Id: BootELILO.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -578,7 +579,7 @@
* @param section string section to boot
* @return boolean true on success
*/
-global define boolean FlagOnetimeBoot (string section) {
+global define boolean FlagBootDefaultOnce (string section) {
/* For now a dummy */
return true;
}
@@ -589,19 +590,20 @@
*/
global map GetFunctions () {
return $[
- "export" : Export,
- "import" : Import,
- "read" : Read,
- "reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
+ "export" : Export,
+ "import" : Import,
+ "read" : Read,
+ "reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagbootdefaultonce" : FlagBootDefaultOnce,
];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/BootGRUB.ycp new/yast2-bootloader-2.15.19/src/modules/BootGRUB.ycp
--- old/yast2-bootloader-2.15.18/src/modules/BootGRUB.ycp 2007-08-20 18:18:02.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/BootGRUB.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -12,8 +12,9 @@
* Authors:
* Jiri Srain
* Joachim Plack
+ * Philipp Thomas
*
- * $Id: BootGRUB.ycp 40367 2007-08-20 15:10:35Z pth $
+ * $Id: BootGRUB.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -1002,53 +1003,39 @@
}
/**
- * Set section to boot on next reboot.
+ * Boot passed section once on next reboot.
* @param section string section to boot
* @return boolean true on success
*/
-global define boolean FlagOnetimeBoot (string section) {
- integer index = -1;
- integer sectnum = -1;
-
- /**
- * Determine section number to avoid having to quote
- * the section name for grubonce.
- */
- foreach (map s, BootCommon::sections,
- {
- index = index + 1;
- if (s["name"]:"" == section)
- sectnum = index;
- });
-
- map result = (map)SCR::Execute (.target.bash_output, sformat (
- "/usr/sbin/grubonce \"%1\"", sectnum));
- y2milestone ("lilo returned %1", result);
- return (result["exit"]:-1 == 0);
+global define boolean FlagOnetimeBoot (string section)
+{
+ map result = (map)SCR::Execute (.target.bash_output, sformat (
+ "/usr/sbin/grubonce \"%1\"", BootCommon::Section2Index(section)));
+ y2milestone ("grubonce returned %1", result);
+ return (result["exit"]:-1 == 0);
}
-
/**
* Return map of provided functions
* @return a map of functions (eg. $["write"::Write])
*/
global map GetFunctions () {
return $[
- //"export" : Export,
- //"import" : Import,
- "read" : Read,
- "reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
- "flagonetimeboot" : FlagOnetimeBoot,
+ //"export" : Export,
+ //"import" : Import,
+ "read" : Read,
+ "reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagonetimeboot" : FlagOnetimeBoot,
];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/BootLILO.ycp new/yast2-bootloader-2.15.19/src/modules/BootLILO.ycp
--- old/yast2-bootloader-2.15.18/src/modules/BootLILO.ycp 2007-08-20 19:10:08.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/BootLILO.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -11,8 +11,9 @@
*
* Authors:
* Jiri Srain
+ * Philipp Thomas
*
- * $Id: BootLILO.ycp 40371 2007-08-20 17:10:08Z pth $
+ * $Id: BootLILO.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -301,13 +302,14 @@
*/
global map GetFunctions () {
return $[
- "dialogs" : Dialogs,
- "read" : Read,
- "propose" : Propose,
- "save" : Save,
- "summary" : BootCommon::i386Summary,
- "update" : Update,
- "write" : Write,
+ "dialogs" : Dialogs,
+ "read" : Read,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : BootCommon::i386Summary,
+ "update" : Update,
+ "write" : Write,
+ "flagonetimeboot" : FlagOnetimeBoot,
];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/Bootloader.ycp new/yast2-bootloader-2.15.19/src/modules/Bootloader.ycp
--- old/yast2-bootloader-2.15.18/src/modules/Bootloader.ycp 2007-08-10 19:48:02.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/Bootloader.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain
*
- * $Id: Bootloader.ycp 40211 2007-08-10 17:29:30Z odabrunz $
+ * $Id: Bootloader.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -276,31 +276,35 @@
BootCommon::backup_mbr = true;
y2milestone ("Proposed settings: %1", Export ());
}
+
+
/**
* Display bootloader summary
* @return a list of summary lines
*/
global define list<string> Summary () {
list<string> ret = blSummary ();
+
// check if default section was changed or not
string main_section = getProposedDefaultSection ();
+
if (main_section == nil)
return ret;
- integer index = -1;
- integer sectnum = -1;
+
if (getLoaderType () == "none")
return ret;
- foreach (map s, BootCommon::sections, {
- index = index + 1;
- if (s["name"]:"" == main_section)
- sectnum = index;
- });
+
+ integer sectnum = BootCommon::Section2Index(main_section);
+
if (sectnum == -1)
return ret;
+
if (BootCommon::sections[sectnum, "__changed"]:false)
return ret;
+
string filtered_cmdline = filterchars (Kernel::GetCmdLine (),
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
+
if (size (filtered_cmdline) > 0)
{
ret = add (ret, sformat (
@@ -916,7 +920,8 @@
* @param section string section to boot
* @return boolean true on success
*/
- global define boolean FlagOnetimeBoot (string section) {
+ global define boolean FlagOnetimeBoot(string section)
+ {
return blFlagOnetimeBoot (section);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/BootPOWERLILO.ycp new/yast2-bootloader-2.15.19/src/modules/BootPOWERLILO.ycp
--- old/yast2-bootloader-2.15.18/src/modules/BootPOWERLILO.ycp 2007-08-20 19:10:08.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/BootPOWERLILO.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -14,8 +14,9 @@
* Jiri Srain
* Joachim Plack
* Olaf Dabrunz
+ * Philipp Thomas
*
- * $Id: BootPOWERLILO.ycp 40371 2007-08-20 17:10:08Z pth $
+ * $Id: BootPOWERLILO.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -1175,9 +1176,10 @@
* @param section string section to boot
* @return boolean true on success
*/
-global define boolean FlagOnetimeBoot (string section) {
- map result = (map)SCR::Execute (.target.bash_output, sformat (
- "/sbin/lilo -R \"%1\"", section));
+global define boolean FlagOnetimeBoot (string section)
+{
+ map result = (map)SCR::Execute (.target.bash_output,
+ sformat ("/sbin/lilo -R \"%1\"", section));
y2milestone ("lilo returned %1", result);
return (result["exit"]:-1 == 0);
}
@@ -1189,20 +1191,20 @@
*/
global map GetFunctions () {
return $[
- "export" : Export,
- "import" : Import,
- "read" : Read,
- "reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
- "flagonetimeboot" : FlagOnetimeBoot,
+ "export" : Export,
+ "import" : Import,
+ "read" : Read,
+ "reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagonetimeboot" : FlagOnetimeBoot,
];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/src/modules/BootZIPL.ycp new/yast2-bootloader-2.15.19/src/modules/BootZIPL.ycp
--- old/yast2-bootloader-2.15.18/src/modules/BootZIPL.ycp 2007-08-20 19:10:08.000000000 +0200
+++ new/yast2-bootloader-2.15.19/src/modules/BootZIPL.ycp 2007-08-30 15:49:53.000000000 +0200
@@ -12,8 +12,9 @@
* Authors:
* Joachim Plack
* Jiri Srain
+ * Philipp Thomas
*
- * $Id: BootZIPL.ycp 40371 2007-08-20 17:10:08Z pth $
+ * $Id: BootZIPL.ycp 40623 2007-08-30 13:49:53Z pth $
*
*/
@@ -290,7 +291,8 @@
* @param section string section to boot
* @return boolean true on success
*/
-global define boolean FlagOnetimeBoot (string section) {
+global define boolean FlagOnetimeBoot (string section)
+{
/* For now a dummy */
return true;
}
@@ -301,19 +303,20 @@
*/
global map GetFunctions () {
return $[
- //"export" : Export,
- //"import" : Import,
- "read" : Read,
- //"reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
+ //"export" : Export,
+ //"import" : Import,
+ "read" : Read,
+ //"reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagonetimeboot" : FlagOnetimeBoot,
];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.15.18/VERSION new/yast2-bootloader-2.15.19/VERSION
--- old/yast2-bootloader-2.15.18/VERSION 2007-08-20 19:10:30.000000000 +0200
+++ new/yast2-bootloader-2.15.19/VERSION 2007-08-30 15:53:07.000000000 +0200
@@ -1 +1 @@
-2.15.18
+2.15.19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org